mt-mods / technic

Technic mod for Minetest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move tool configurations to technic.conf

S-S-X opened this issue · comments

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:

local flashlight_max_charge = 30000

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",