diff --git a/cybersyn/locale/en/base.cfg b/cybersyn/locale/en/base.cfg index 6671d9d..ab182b1 100644 --- a/cybersyn/locale/en/base.cfg +++ b/cybersyn/locale/en/base.cfg @@ -12,6 +12,8 @@ cybersyn-warmup-time=Station warmup time (sec) cybersyn-stuck-train-time=Stuck train timeout (sec) cybersyn-allow-cargo-in-depot=Allow cargo in depots cybersyn-invert-sign=Invert combinator output (deprecated) +cybersyn-manager-enabled=Enable the Cybersyn GUI. +cybersyn-manager-update-rate=Manager refresh tick interval [mod-setting-description] cybersyn-enable-planner=Enable or disable the central planning algorithm. If disabled no new trains will be dispatched. @@ -28,6 +30,7 @@ cybersyn-stuck-train-time=After this many seconds from a train's dispatch, an al cybersyn-allow-cargo-in-depot=If checked, trains will be allowed to have cargo in depots; no alerts will be generated and the train will not be held. In addition, trains with orders to visit requester stations with "Inactivity condition" checked will wait for inactivity instead of waiting for empty cargo. Useful for creating train systems where depots handle excess cargo. For advanced users only. cybersyn-invert-sign=Flip the sign of the output of cybernetic combinators to be the same as it is in LTN or in earlier versions of Project Cybersyn. + [item-name] cybersyn-combinator=Cybernetic combinator diff --git a/cybersyn/locale/en/manager.cfg b/cybersyn/locale/en/manager.cfg index ad64f1d..7730cb9 100644 --- a/cybersyn/locale/en/manager.cfg +++ b/cybersyn/locale/en/manager.cfg @@ -84,7 +84,6 @@ iterations-per-tick=Decrease this number if you're having performance issues. [cybersyn-mod-setting-name] history-length=History length iterations-per-tick=Iterations per tick [img=info] -cybersyn-manager-update-rate=Manager refresh tick interval [shortcut-name] cybersyn-toggle-gui=Toggle Cybersyn Manager diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index 64087cc..a424048 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -825,6 +825,7 @@ local function grab_all_settings() mod_settings.stuck_train_time = settings.global["cybersyn-stuck-train-time"].value--[[@as double]] mod_settings.allow_cargo_in_depot = settings.global["cybersyn-allow-cargo-in-depot"].value--[[@as boolean]] mod_settings.invert_sign = settings.global["cybersyn-invert-sign"].value--[[@as boolean]] + mod_settings.manager_enabled = settings.startup["cybersyn-manager-enabled"].value--[[@as boolean]] mod_settings.manager_update_rate = settings.startup["cybersyn-manager-update-rate"].value--[[@as int]] end local function on_settings_changed(event) @@ -904,7 +905,7 @@ local function main() end - local MANAGER_ENABLED = true --convert to mod setting? + local MANAGER_ENABLED = mod_settings.manager_enabled script.on_init(function() local setting = settings.global["cybersyn-invert-sign"] diff --git a/cybersyn/settings.lua b/cybersyn/settings.lua index 3f66799..b5494e4 100644 --- a/cybersyn/settings.lua +++ b/cybersyn/settings.lua @@ -111,6 +111,13 @@ data:extend({ minimum_value = 1, maximum_value = 2147483647, }, + { + type = "bool-setting", + name = "cybersyn-manager-enabled", + order = "aa", + setting_type = "startup", + default_value = true, + }, --{ -- type = "bool-setting", -- name = "cybersyn-disable-top-left-button",