diff options
author | DS <vorunbekannt75@web.de> | 2017-04-14 03:13:30 +0200 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-04-13 21:13:30 -0400 |
commit | d82227942d3a9e4c68582224327cab13e6556753 (patch) | |
tree | 87751e3ed01c379f2fed1969b2b8eeda0b47b85e /default_settings.lua | |
parent | 3679943620efccf45b330c25b2b7ff7636365104 (diff) |
Nice settings (#171)
* improve style
* do something
* make settingtypes nicer
* fix settingtypes new lines
* fix it and so make it work :cat2:
Diffstat (limited to 'default_settings.lua')
-rw-r--r-- | default_settings.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/default_settings.lua b/default_settings.lua new file mode 100644 index 0000000..6f661b5 --- /dev/null +++ b/default_settings.lua @@ -0,0 +1,40 @@ +-- Various settings + +local prefix = "pipeworks_" + +local settings = { + enable_pipes = true, + enable_autocrafter = true, + enable_deployer = true, + enable_dispenser = true, + enable_node_breaker = true, + enable_teleport_tube = true, + enable_pipe_devices = true, + enable_redefines = true, + enable_mese_tube = true, + enable_detector_tube = true, + enable_digiline_detector_tube = true, + enable_conductor_tube = true, + enable_accelerator_tube = true, + enable_crossing_tube = true, + enable_sand_tube = true, + enable_mese_sand_tube = true, + enable_one_way_tube = true, + enable_priority_tube = true, + enable_cyclic_mode = true, + drop_on_routing_fail = false, + + delete_item_on_clearobject = true, +} + +for name, value in pairs(settings) do + local setting_type = type(value) + if setting_type == "boolean" then + pipeworks[name] = minetest.setting_getbool(prefix..name) + if pipeworks[name] == nil then + pipeworks[name] = value + end + else + pipeworks[name] = value + end +end |