diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-01-05 20:38:08 -0700 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-01-05 20:38:08 -0700 |
commit | 253ff1281571b888cfbfeb1a719eb98a1b5b98de (patch) | |
tree | d0995c9782df97af058b9b3757acba805d80676d /node_controllers.lua | |
parent | 1307710a60589555f7f08da90b28b78ae111f565 (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.lua | 6 |
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}) |