-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
67 lines (59 loc) · 1.94 KB
/
index.ts
File metadata and controls
67 lines (59 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import * as lib from "@clusterio/lib";
import * as messages from "./messages";
lib.definePermission({
name: "ctron_plugin.jobs.read",
title: "Read Constructron jobs",
description: "Read Constructron jobs persisted on the controller.",
});
lib.definePermission({
name: "ctron_plugin.settings.write",
title: "Write Constructron settings",
description: "Edit constructron settings via the web UI (controller authority mode only).",
});
declare module "@clusterio/lib" {
export interface ControllerConfigFields {
"ctron_plugin.settings_sync_mode": string;
}
export interface InstanceConfigFields { }
}
export const plugin: lib.PluginDeclaration = {
name: "ctron_plugin",
title: "Ctron Plugin",
description: "Persists Constructron jobs on the controller and displays them in the Web UI.",
controllerEntrypoint: "./dist/node/controller",
controllerConfigFields: {
"ctron_plugin.settings_sync_mode": {
title: "Settings Sync Mode",
description: "Controls how constructron settings are synced. 'in_game': player changes push to all instances. 'controller': settings are managed via web UI.",
type: "string",
initialValue: "in_game",
enum: ["in_game", "controller"],
},
},
instanceEntrypoint: "./dist/node/instance",
instanceConfigFields: {},
messages: [
messages.ConstructronJobAdd,
messages.ConstructronJobClaim,
messages.ConstructronJobConsume,
messages.ConstructronJobRemove,
messages.ConstructronJobUpdate,
messages.CtronPathRequest,
messages.CtronForwardPathRequest,
messages.CtronPathResponse,
messages.CtronReturnPathResponse,
messages.InstanceServiceStationStatusUpdate,
messages.InstanceServiceStationStatusStream,
messages.CtronSurfaceRegister,
messages.CtronSettingsUpdate,
messages.CtronSettingsBroadcast,
messages.CtronSettingsPull,
messages.CtronSettingsSet,
messages.CtronSettingsGet,
messages.CtronSubscriberAvailabilityBroadcast,
],
webEntrypoint: "./web",
routes: [
"/ctron_plugin",
],
};