mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Add feature flags to first party plugins
This commit is contained in:
12 files changed
+27
-34
No files matched your search
@@ -22,4 +22,9 @@ export const plugin: lib.PluginDeclaration = {
|
||||
initialValue: 1,
|
||||
},
|
||||
},
|
||||
|
||||
features: [
|
||||
"SavePatching",
|
||||
"ScriptCommands",
|
||||
],
|
||||
};
|
||||
@@ -104,15 +104,6 @@ function setForceFlowStatistic(
|
||||
|
||||
|
||||
export class InstancePlugin extends BaseInstancePlugin {
|
||||
async init() {
|
||||
if (!this.instance.config.get("factorio.enable_save_patching")) {
|
||||
throw new Error("statistics_exporter plugin requires save patching.");
|
||||
}
|
||||
if (!this.instance.config.get("factorio.enable_script_commands")) {
|
||||
throw new Error("statistics_exporter plugin requires script commands.");
|
||||
}
|
||||
}
|
||||
|
||||
async gatherMetrics() {
|
||||
let string = await this.sendRcon("/sc statistics_exporter.export()");
|
||||
let stats: IpcStats;
|
||||
|
||||
Reference in new issue
Block a user