summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-02-14 14:51:57 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-02-14 14:51:57 -0700
commitc7f8d704b06e0cabc49f3b438d278566357c595a (patch)
tree599d490b4d7f82510959ef31add6435d73389c27
parentc57582e77570a383b6d094cbd26bc350f3233dd7 (diff)
I was reading the "uses resources" setting incorrectly, defaulted to false on new games
-rw-r--r--LICENSE.txt2
-rw-r--r--init.lua6
2 files changed, 5 insertions, 3 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
index e800668..3e6033f 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -11,7 +11,7 @@ Sounds are under various licenses, see the license.txt file in the /sounds direc
License for Code
----------------
-Copyright (C) 2016 FaceDeer
+Copyright (C) 2017 FaceDeer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
diff --git a/init.lua b/init.lua
index 046839e..ab849f3 100644
--- a/init.lua
+++ b/init.lua
@@ -23,14 +23,16 @@ dofile( minetest.get_modpath( "digtron" ) .. "/recipes.lua" )
local particle_effects = minetest.setting_getbool("enable_particles")
-- this causes digtrons to operate without consuming fuel or building materials.
-local digtron_creative = not minetest.setting_getbool("digtron_uses_resources")
+local digtron_uses_resources = minetest.setting_getbool("digtron_uses_resources")
+if digtron_uses_resources == nil then digtron_uses_resources = true end
+
-- when true, lava counts as protected nodes.
local lava_impassible = minetest.setting_getbool("digtron_lava_impassible")
-- when true, diggers deal damage to creatures when they trigger.
local damage_creatures = minetest.setting_getbool("digtron_damage_creatures")
-digtron.creative_mode = digtron_creative -- default false
+digtron.creative_mode = not digtron_uses_resources -- default false
digtron.particle_effects = particle_effects or particle_effects == nil -- default true
digtron.lava_impassible = lava_impassible or lava_impassible == nil -- default true
digtron.diggers_damage_creatures = damage_creatures or damage_creatures == nil -- default true