Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tool configurations to technic.conf #238

Open
S-S-X opened this issue Nov 5, 2021 · 0 comments
Open

Move tool configurations to technic.conf #238

S-S-X opened this issue Nov 5, 2021 · 0 comments
Labels
Enhancement New feature or request Good first issue Good for newcomers

Comments

@S-S-X
Copy link
Member

S-S-X commented Nov 5, 2021

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",
@S-S-X S-S-X added Enhancement New feature or request Good first issue Good for newcomers labels Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant