From f971711eb062b8cc8ade61fb36c1ae37b810af23 Mon Sep 17 00:00:00 2001 From: Jonas Holst Damtoft Date: Sun, 14 Jan 2024 20:11:22 +0100 Subject: [PATCH] feat: make serverOptions optional --- screeps-start.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screeps-start.js b/screeps-start.js index aecb3c3..f80c01a 100755 --- a/screeps-start.js +++ b/screeps-start.js @@ -143,9 +143,11 @@ const start = async () => { storage_disable: false, }; + const serverOptions = config.serverOptions || {}; + for (const [configKey, optionsKey] of Object.entries(ServerConfigMap)) { - if (configKey in config.serverOptions) { - options[optionsKey] = config.serverOptions[configKey]; + if (configKey in serverOptions) { + options[optionsKey] = serverOptions[configKey]; } }