summaryrefslogtreecommitdiff
path: root/node_controllers.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-05 20:38:08 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-05 20:38:08 -0700
commit253ff1281571b888cfbfeb1a719eb98a1b5b98de (patch)
treed0995c9782df97af058b9b3757acba805d80676d /node_controllers.lua
parent1307710a60589555f7f08da90b28b78ae111f565 (diff)
add lava and water alerts, and an option for setting lava impassible (true by default)
Diffstat (limited to 'node_controllers.lua')
-rw-r--r--node_controllers.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/node_controllers.lua b/node_controllers.lua
index cfd449b..c897502 100644
--- a/node_controllers.lua
+++ b/node_controllers.lua
@@ -32,6 +32,12 @@ local execute_cycle = function(pos, clicker)
return pos, "Digtron is adjacent to unloaded nodes.\n" .. status_text
end
+ if layout.water_touching == true then
+ minetest.sound_play("sploosh", {gain=1.0, pos=pos})
+ end
+ if layout.lava_touching == true then
+ minetest.sound_play("woopwoopwoop", {gain=1.0, pos=pos})
+ end
if layout.traction * digtron.traction_factor < table.getn(layout.all) then
-- digtrons can't fly
minetest.sound_play("squeal", {gain=1.0, pos=pos})