This table should be moved to another file (constants/defaults.lua or something else) and cost_factor should actually contain the selected cost (which is read above on the mod_settings.maintenance_level), so it would look something like this:
Note: It seems that this table is iterated over on control.lua.
Not yet sure why though.
Since I'm trying to fully refactor this mod, I started from the first files that are loaded and so only now I got to touch on the old config-runtime.lua which I renamed and moved into a lib folder as lib/runtime-settings.lua.
There's still control.lua and control-gui.lua to refactor, so I'll keep it as it is right now, but I think we'll need to change this.
Currently we have:
This table should be moved to another file (constants/defaults.lua or something else) and cost_factor should actually contain the selected cost (which is read above on the
mod_settings.maintenance_level
), so it would look something like this:Note: It seems that this table is iterated over on
control.lua
. Not yet sure why though.Since I'm trying to fully refactor this mod, I started from the first files that are loaded and so only now I got to touch on the old
config-runtime.lua
which I renamed and moved into alib
folder aslib/runtime-settings.lua
. There's stillcontrol.lua
andcontrol-gui.lua
to refactor, so I'll keep it as it is right now, but I think we'll need to change this.