summaryrefslogtreecommitdiff
path: root/util.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-09-12 00:20:52 -0600
committerFaceDeer <derksenmobile@gmail.com>2017-09-12 00:20:52 -0600
commit46bffd82d38ded68bcf102efd25da06a96e64a5d (patch)
treed9bc253c93583ca9087e890afa5f9309fe340126 /util.lua
parent15b327c842ebe4189ceae16a419dce974c8b2451 (diff)
standardize config settings
Diffstat (limited to 'util.lua')
-rw-r--r--util.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/util.lua b/util.lua
index e32c16b..3f1d732 100644
--- a/util.lua
+++ b/util.lua
@@ -52,21 +52,21 @@ digtron.mark_diggable = function(pos, nodes_dug)
local in_known_group = false
local material_cost = 0
- if digtron.creative_mode ~= true then
+ if digtron.config.uses_resources then
if minetest.get_item_group(target.name, "cracky") ~= 0 then
in_known_group = true
- material_cost = math.max(material_cost, digtron.dig_cost_cracky)
+ material_cost = math.max(material_cost, digtron.config.dig_cost_cracky)
end
if minetest.get_item_group(target.name, "crumbly") ~= 0 then
in_known_group = true
- material_cost = math.max(material_cost, digtron.dig_cost_crumbly)
+ material_cost = math.max(material_cost, digtron.config.dig_cost_crumbly)
end
if minetest.get_item_group(target.name, "choppy") ~= 0 then
in_known_group = true
- material_cost = math.max(material_cost, digtron.dig_cost_choppy)
+ material_cost = math.max(material_cost, digtron.config.dig_cost_choppy)
end
if not in_known_group then
- material_cost = digtron.dig_cost_default
+ material_cost = digtron.config.dig_cost_default
end
end