Move tool configurations to technic.conf
S-S-X opened this issue · comments
SX commented
What to fix
There's still a lot of hard coded configuration which requires editing source files to change values.
It would be good to move all this into technic.conf, doing so is also very simple task.
For example flashlight max charge is hardcoded value in source file:
technic/technic/tools/flashlight.lua
Line 4 in 713409b
How to fix, repeat for all tools / all configuration values:
Mentioned example for flashlight should be like this in flashlight.lua:
local flashlight_max_charge = technic.config:get_int("flashlight_max_charge")
And in config.lua added to defaults table:
local defaults = {
-- Power tool options
flashlight_max_charge = "30000",