mt-mods / mt-mods/technic

Move tool configurations to technic.conf

Open
#238 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Good first issue
Dominant language
Lua
Stars
23
Forks
33
PR merge metrics
No merged PRs in 30d

Description

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:
https://github.com/mt-mods/technic/blob/713409b55510313af6e6bee986546600fd6f55ba/technic/tools/flashlight.lua#L4

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with technic/tools/flashlight.lua and config.lua, using the existing flashlight_max_charge example as the entry point. Inspect the other tool files for hard-coded configuration values and add corresponding defaults where needed. Done means tool settings are read from technic.conf rather than requiring source edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.