mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Add validator to load_plugin
This commit is contained in:
3 files changed
+165
-46
No files matched your search
@@ -7,6 +7,14 @@ import type { Logger } from "./logging";
|
||||
import type { FieldDefinition } from "./config";
|
||||
import type { PlayerStats } from "./data";
|
||||
|
||||
|
||||
export const PluginFeatureFlags = [
|
||||
/** The plugin requires module code to be patched into the save */
|
||||
"SavePatching",
|
||||
/** The plugin requires access to script commands over rcon */
|
||||
"ScriptCommands",
|
||||
] as const;
|
||||
|
||||
/** Used to define the plugin export in plugins */
|
||||
export type PluginDeclaration = {
|
||||
name: string;
|
||||
@@ -26,6 +34,8 @@ export type PluginDeclaration = {
|
||||
webEntrypoint?: string;
|
||||
controlConfigFields?: Record<string, FieldDefinition>;
|
||||
|
||||
features?: (typeof PluginFeatureFlags)[number][];
|
||||
|
||||
messages?: any[];
|
||||
routes?: string[];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user