diff options
author | Marcin <beyondlimits@10g.pl> | 2015-10-01 19:13:12 +0200 |
---|---|---|
committer | Marcin <beyondlimits@10g.pl> | 2015-10-01 19:13:12 +0200 |
commit | 6e326a6a03a989f887f7e8da2be3b5b7cdb64619 (patch) | |
tree | d817a7b120dc88791866464b3639a1d22b167be6 | |
parent | d95ccf86f8f2ad05d9ba4cf007e6ee1422fb25f5 (diff) | |
download | mesecons-6e326a6a03a989f887f7e8da2be3b5b7cdb64619.tar mesecons-6e326a6a03a989f887f7e8da2be3b5b7cdb64619.tar.gz mesecons-6e326a6a03a989f887f7e8da2be3b5b7cdb64619.tar.bz2 mesecons-6e326a6a03a989f887f7e8da2be3b5b7cdb64619.tar.xz mesecons-6e326a6a03a989f887f7e8da2be3b5b7cdb64619.zip |
Use right mouse button instead of left to press button and change state of switch and lever.
-rw-r--r-- | mesecons_button/init.lua | 2 | ||||
-rw-r--r-- | mesecons_switch/init.lua | 2 | ||||
-rw-r--r-- | mesecons_walllever/init.lua | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/mesecons_button/init.lua b/mesecons_button/init.lua index ead688e..a61e5e3 100644 --- a/mesecons_button/init.lua +++ b/mesecons_button/init.lua @@ -40,7 +40,7 @@ minetest.register_node("mesecons_button:button_off", { }, groups = {dig_immediate=2, mesecon_needs_receiver = 1}, description = "Button", - on_punch = function (pos, node) + on_rightclick = function (pos, node) minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2}) mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node)) minetest.sound_play("mesecons_button_push", {pos=pos}) diff --git a/mesecons_switch/init.lua b/mesecons_switch/init.lua index 2b3c3ee..f52f083 100644 --- a/mesecons_switch/init.lua +++ b/mesecons_switch/init.lua @@ -4,7 +4,7 @@ mesecon.register_node("mesecons_switch:mesecon_switch", { paramtype2="facedir", description="Switch", sounds = default.node_sound_stone_defaults(), - on_punch = function (pos, node) + on_rightclick = function (pos, node) if(mesecon.flipstate(pos, node) == "on") then mesecon.receptor_on(pos) else diff --git a/mesecons_walllever/init.lua b/mesecons_walllever/init.lua index 5ebb6f8..9ae0655 100644 --- a/mesecons_walllever/init.lua +++ b/mesecons_walllever/init.lua @@ -15,7 +15,7 @@ mesecon.register_node("mesecons_walllever:wall_lever", { fixed = { -8/16, -8/16, 3/16, 8/16, 8/16, 8/16 }, }, sounds = default.node_sound_wood_defaults(), - on_punch = function (pos, node) + on_rightclick = function (pos, node) if(mesecon.flipstate(pos, node) == "on") then mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node)) else |