mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 15:43:13 +09:00
Rename inventory_sync to player_sync
The plugin syncs more than inventories now (settings, appearance, recipe notifications), so name it for what it does. The package becomes @clusterio/plugin-player_sync and every inventory_sync identifier follows. A migration entrypoint renames the inventory_sync config fields, including load_plugin, and the inventory view permission. The plugin moves inventories.json in the database directory to player_sync.json and storage.inventory_sync in saves to storage.player_sync itself, and closes dialogs left open under the old GUI names on startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e455d17bb7
commit
8363c5f0ef
39 files changed
+331
-177
No files matched your search
@@ -0,0 +1,67 @@
|
||||
import * as lib from "@clusterio/lib";
|
||||
import * as messages from "./messages.js";
|
||||
|
||||
declare module "@clusterio/lib" {
|
||||
export interface InstanceConfigFields {
|
||||
"player_sync.rcon_chunk_size": number;
|
||||
}
|
||||
export interface ControllerConfigFields {
|
||||
"player_sync.player_lock_timeout": number;
|
||||
}
|
||||
export interface Permissions {
|
||||
"player_sync.inventory.view": never;
|
||||
}
|
||||
}
|
||||
|
||||
export const plugin: lib.PluginDeclaration = {
|
||||
name: "player_sync",
|
||||
title: "Player sync",
|
||||
description: "Synchronizes player inventories and settings between instances",
|
||||
migrationEntrypoint: "dist/node/migrations.js",
|
||||
|
||||
instanceEntrypoint: "dist/node/instance.js",
|
||||
instanceConfigFields: {
|
||||
"player_sync.rcon_chunk_size": {
|
||||
title: "Rcon inventory chunk size",
|
||||
description:
|
||||
"Divide inventories into chunks of this size before sending with rcon to prevent blocking the pipe",
|
||||
type: "number",
|
||||
initialValue: 1000,
|
||||
},
|
||||
},
|
||||
|
||||
controllerEntrypoint: "dist/node/controller.js",
|
||||
controllerConfigFields: {
|
||||
"player_sync.player_lock_timeout": {
|
||||
title: "Player Lock Timeout",
|
||||
description:
|
||||
"Time in seconds before the lock on a player inventory expires after an instance stops " +
|
||||
"or is disconnected",
|
||||
type: "number",
|
||||
initialValue: 60,
|
||||
},
|
||||
},
|
||||
|
||||
features: [
|
||||
"SavePatching",
|
||||
"ScriptCommands",
|
||||
],
|
||||
|
||||
messages: [
|
||||
messages.AcquireRequest,
|
||||
messages.ReleaseRequest,
|
||||
messages.UploadRequest,
|
||||
messages.DownloadRequest,
|
||||
messages.DatabaseStatsRequest,
|
||||
],
|
||||
permissions: [
|
||||
{
|
||||
name: "player_sync.inventory.view",
|
||||
title: "View player inventories",
|
||||
description: "View player inventories",
|
||||
grantByDefault: true,
|
||||
},
|
||||
],
|
||||
webEntrypoint: "./web",
|
||||
routes: ["/inventory"],
|
||||
};
|
||||
Reference in new issue
Block a user