ShadowNinja
2013-10-19 eac48441754260fe42c7a605e72141a79ed79bc1
commit | author | age
8e03d7 1
ee0765 2 local worldpath = minetest.get_worldpath()
8e03d7 3
ee0765 4 technic.config = Settings(worldpath.."/technic.conf")
S 5
6 local conf_table = technic.config:to_table()
7
8 local defaults = {
8e03d7 9     enable_mining_drill = "true",
R 10     enable_mining_laser = "true",
eac484 11     enable_flashlight = "false",
8e03d7 12     enable_rubber_tree_generation = "true",
R 13     enable_marble_generation = "true",
ee0765 14     enable_granite_generation = "true",
363f03 15     enable_wind_mill = "false",
8e03d7 16 }
R 17
ee0765 18 for k, v in pairs(defaults) do
S 19     if conf_table[k] == nil then
20         technic.config:set(k, v)
8e03d7 21     end
R 22 end
23
902089 24 -- Create the config file if it doesn't exist
S 25 technic.config:write()
26