mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-22 07:33:12 +09:00
Add exp_server_list to replace expcore/external
The controller keeps a record per instance with its name, mod pack, Factorio version, players online, status and address, and the instance plugin pushes the list into lua over rcon. The readme and the connect commands read it through modules/exp_server_list, so expcore/external and its hardcoded server fallback are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b19bbbe5f3
commit
4d136853c9
31 files changed
+1367
-307
No files matched your search
@@ -0,0 +1,70 @@
|
||||
import * as lib from "@clusterio/lib";
|
||||
import * as messages from "./messages.js";
|
||||
|
||||
declare module "@clusterio/lib" {
|
||||
export interface InstanceConfigFields {
|
||||
"exp_server_list.short_name": string;
|
||||
"exp_server_list.description": string;
|
||||
"exp_server_list.welcome": string;
|
||||
"exp_server_list.reset_time": string;
|
||||
"exp_server_list.hidden": boolean;
|
||||
}
|
||||
|
||||
export interface Permissions {
|
||||
"exp_server_list.list": never;
|
||||
}
|
||||
}
|
||||
|
||||
export const plugin: lib.PluginDeclaration = {
|
||||
name: "exp_server_list",
|
||||
title: "ExpGaming - Server List",
|
||||
description: "Clusterio plugin sharing the details of every instance with the others",
|
||||
|
||||
controllerEntrypoint: "./dist/node/controller.js",
|
||||
instanceEntrypoint: "./dist/node/instance.js",
|
||||
instanceConfigFields: {
|
||||
"exp_server_list.short_name": {
|
||||
title: "Short Name",
|
||||
description: "Name shown in the server list, the instance name when empty",
|
||||
type: "string",
|
||||
initialValue: "",
|
||||
},
|
||||
"exp_server_list.description": {
|
||||
title: "Description",
|
||||
description: "One line about the server shown in the server list",
|
||||
type: "string",
|
||||
initialValue: "",
|
||||
},
|
||||
"exp_server_list.welcome": {
|
||||
title: "Welcome",
|
||||
description: "Message shown on the welcome tab of the readme",
|
||||
type: "string",
|
||||
initialValue: "",
|
||||
},
|
||||
"exp_server_list.reset_time": {
|
||||
title: "Reset Time",
|
||||
description: "When the map next resets, shown on the welcome tab of the readme",
|
||||
type: "string",
|
||||
initialValue: "",
|
||||
},
|
||||
"exp_server_list.hidden": {
|
||||
title: "Hidden",
|
||||
description: "Leave this instance out of the server list on other instances",
|
||||
type: "boolean",
|
||||
initialValue: false,
|
||||
},
|
||||
},
|
||||
|
||||
messages: [
|
||||
messages.ServerUpdatesEvent,
|
||||
messages.ServerListRequest,
|
||||
],
|
||||
|
||||
permissions: [
|
||||
{
|
||||
name: "exp_server_list.list",
|
||||
title: "List servers",
|
||||
description: "View the server list and subscribe to its updates",
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in new issue
Block a user