summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2016-08-22 23:07:57 -0500
committercheapie <no-email-for-you@example.com>2016-08-22 23:07:57 -0500
commit26c8998cdf897c28e4d3f7ba5016af8055e91321 (patch)
treeea787161b2dbeb49e9576b930cefd363a41c9989
parent874cfdfd306bd1438a632d0444e2ec1bf2d8e7a9 (diff)
downloaddigistuff-26c8998cdf897c28e4d3f7ba5016af8055e91321.tar
digistuff-26c8998cdf897c28e4d3f7ba5016af8055e91321.tar.gz
digistuff-26c8998cdf897c28e4d3f7ba5016af8055e91321.tar.bz2
digistuff-26c8998cdf897c28e4d3f7ba5016af8055e91321.tar.xz
digistuff-26c8998cdf897c28e4d3f7ba5016af8055e91321.zip
Remove mesecons hard dependency
-rw-r--r--depends.txt2
-rw-r--r--init.lua6
2 files changed, 4 insertions, 4 deletions
diff --git a/depends.txt b/depends.txt
index 5997a99..39f4fe0 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,2 +1,2 @@
digilines
-mesecons \ No newline at end of file
+mesecons?
diff --git a/init.lua b/init.lua
index 166765d..e36f28c 100644
--- a/init.lua
+++ b/init.lua
@@ -111,7 +111,7 @@ digistuff.button_turnoff = function (pos)
local node = minetest.get_node(pos)
if node.name=="digistuff:button_on" then --has not been dug
minetest.swap_node(pos, {name = "digistuff:button_off", param2=node.param2})
- minetest.sound_play("mesecons_button_pop", {pos=pos})
+ if minetest.get_modpath("mesecons") then minetest.sound_play("mesecons_button_pop", {pos=pos}) end
end
end
@@ -219,7 +219,7 @@ minetest.register_node("digistuff:button_off", {
local meta = minetest.get_meta(pos)
digiline:receptor_send(pos, digiline.rules.default, meta:get_string("channel"), meta:get_string("msg"))
minetest.swap_node(pos, {name = "digistuff:button_on", param2=node.param2})
- minetest.sound_play("mesecons_button_push", {pos=pos})
+ if minetest.get_modpath("mesecons") then minetest.sound_play("mesecons_button_push", {pos=pos}) end
minetest.after(0.5, digistuff.button_turnoff, pos)
end,
sounds = default.node_sound_stone_defaults(),
@@ -261,7 +261,7 @@ minetest.register_node("digistuff:button_on", {
on_rightclick = function (pos, node, clicker)
local meta = minetest.get_meta(pos)
digiline:receptor_send(pos, digiline.rules.default, meta:get_string("channel"), meta:get_string("msg"))
- minetest.sound_play("mesecons_button_push", {pos=pos})
+ if minetest.get_modpath("mesecons") then minetest.sound_play("mesecons_button_push", {pos=pos}) end
end,
description = "Digilines Button (on state - you hacker you!)",
sounds = default.node_sound_stone_defaults(),