Added factorio.enable_script_commands

This commit is contained in:
Cooldude2606 authored and Daniel committed 2024-11-21 08:46:22 -08:00
1 parent feb09a6fe0
commit 762212747e
7 files changed
+46

No files matched your search

+4
View File
@@ -20,6 +20,10 @@ export class InstancePlugin extends BaseInstancePlugin {
}
async init() {
if (!this.instance.config.get("factorio.enable_script_commands")) {
throw new Error("subspace_storage plugin requires script commands.");
}
this.pendingTasks = new Set();
this.instance.server.on("ipc-subspace_storage:output", (output: IpcItems) => {
this.provideItems(output).catch(err => this.unexpectedError(err));