technic/technic_worldgen/config.lua
Zefram 9f0b41fe71 Make technic_worldgen loadable before technic
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.
2014-07-26 19:20:45 +01:00

16 lines
367 B
Lua

technic.config = technic.config or Settings(minetest.get_worldpath().."/technic.conf")
local conf_table = technic.config:to_table()
local defaults = {
enable_granite_generation = "true",
enable_marble_generation = "true",
enable_rubber_tree_generation = "true",
}
for k, v in pairs(defaults) do
if conf_table[k] == nil then
technic.config:set(k, v)
end
end