summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2015-12-29 17:15:14 -0600
committercheapie <no-email-for-you@example.com>2015-12-29 17:15:14 -0600
commit5fee6f74b195c753f6781392a7d74aa5172c0343 (patch)
tree9bfe8a2fb5669108d2e13f4fbd0d45e60a3cfa9b
parenta9d88e4b1cefe6be803832a6a1a4b72e00405dfb (diff)
downloaddigistuff-5fee6f74b195c753f6781392a7d74aa5172c0343.tar
digistuff-5fee6f74b195c753f6781392a7d74aa5172c0343.tar.gz
digistuff-5fee6f74b195c753f6781392a7d74aa5172c0343.tar.bz2
digistuff-5fee6f74b195c753f6781392a7d74aa5172c0343.tar.xz
digistuff-5fee6f74b195c753f6781392a7d74aa5172c0343.zip
Make buttons feel faster
-rw-r--r--init.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 8539e50..421779f 100644
--- a/init.lua
+++ b/init.lua
@@ -113,7 +113,7 @@ minetest.register_node("digibutton:button_off", {
digiline:receptor_send(pos, digiline.rules.default, meta:get_string("channel"), meta:get_string("msg"))
minetest.swap_node(pos, {name = "digibutton:button_on", param2=node.param2})
minetest.sound_play("mesecons_button_push", {pos=pos})
- minetest.after(1, digibutton.button_turnoff, pos)
+ minetest.after(0.5, digibutton.button_turnoff, pos)
end,
sounds = default.node_sound_stone_defaults(),
})
@@ -151,6 +151,11 @@ minetest.register_node("digibutton:button_on", {
},
groups = {dig_immediate=2, not_in_creative_inventory=1},
drop = 'digibutton:button',
+ 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})
+ end,
description = "Digilines Button (on state - you hacker you!)",
sounds = default.node_sound_stone_defaults(),
})