Add validator to load_plugin

This commit is contained in:
Cooldude2606 committed 2026-03-24 17:36:19 +00:00
1 parent 71dfb8ca24
commit 790c2834f2
3 files changed
+165 -46

No files matched your search

+10
View File
@@ -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[];
}