mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-12 05:20:42 +01:00
9f0b41fe71
There was a small amount of dependency of technic_worldgen on the technic mod, for configuration loading and the top-level "technic" table. Resolve that by sharing the configuration and top-level table between the two mods. This means that technic_worldgen can be loaded before technic, permitting other mods to depend on it without depending on technic.
18 lines
408 B
Lua
18 lines
408 B
Lua
technic.config = technic.config or Settings(minetest.get_worldpath().."/technic.conf")
|
|
|
|
local conf_table = technic.config:to_table()
|
|
|
|
local defaults = {
|
|
enable_mining_drill = "true",
|
|
enable_mining_laser = "true",
|
|
enable_flashlight = "false",
|
|
enable_wind_mill = "false",
|
|
enable_corium_griefing = "true",
|
|
}
|
|
|
|
for k, v in pairs(defaults) do
|
|
if conf_table[k] == nil then
|
|
technic.config:set(k, v)
|
|
end
|
|
end
|