summaryrefslogtreecommitdiff
path: root/util.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-03 23:56:34 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-03 23:56:34 -0700
commitd545593f273430cb31966d6eb63aa44a229b76ef (patch)
tree45824ba5867d84e58810411a4d521829d64ed43f /util.lua
parentf43e64caba3e9be12a0ed345fd0eae35cbfd15e2 (diff)
combatibility with Carbone (and presumably other games that use older versions of the default mod)
Diffstat (limited to 'util.lua')
-rw-r--r--util.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.lua b/util.lua
index 73c72dc..e27e59b 100644
--- a/util.lua
+++ b/util.lua
@@ -4,6 +4,14 @@ digtron = {}
dofile( minetest.get_modpath( "digtron" ) .. "/util_item_place_node.lua" ) -- separated out to avoid potential for license complexity
+-- Apparently node_sound_metal_defaults is a newer thing, I ran into games using an older version of the default mod without it.
+if default.node_sound_metal_defaults ~= nil then
+ digtron.metal_sounds = default.node_sound_metal_defaults()
+else
+ digtron.metal_sounds = default.node_sound_stone_defaults()
+end
+
+
digtron.find_new_pos = function(pos, facing)
-- finds the point one node "forward", based on facing
local dir = minetest.facedir_to_dir(facing)