From 9f0b41fe713e0ff973c09e2f8e52624d40551ff9 Mon Sep 17 00:00:00 2001 From: Zefram Date: Sat, 26 Jul 2014 19:03:07 +0100 Subject: 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. --- technic_worldgen/config.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 technic_worldgen/config.lua (limited to 'technic_worldgen/config.lua') diff --git a/technic_worldgen/config.lua b/technic_worldgen/config.lua new file mode 100644 index 0000000..4ac748c --- /dev/null +++ b/technic_worldgen/config.lua @@ -0,0 +1,15 @@ +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 -- cgit v1.2.3