forked from Mirrorlandia_minetest/mesecons
Merge pull request #239 from beyondlimits/master
Use right mouse button instead of left to press button and change state of switch and lever.
This commit is contained in:
commit
6ef3b965df
@ -40,7 +40,7 @@ minetest.register_node("mesecons_button:button_off", {
|
|||||||
},
|
},
|
||||||
groups = {dig_immediate=2, mesecon_needs_receiver = 1},
|
groups = {dig_immediate=2, mesecon_needs_receiver = 1},
|
||||||
description = "Button",
|
description = "Button",
|
||||||
on_punch = function (pos, node)
|
on_rightclick = function (pos, node)
|
||||||
minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2})
|
minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2})
|
||||||
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||||
minetest.sound_play("mesecons_button_push", {pos=pos})
|
minetest.sound_play("mesecons_button_push", {pos=pos})
|
||||||
|
@ -4,7 +4,7 @@ mesecon.register_node("mesecons_switch:mesecon_switch", {
|
|||||||
paramtype2="facedir",
|
paramtype2="facedir",
|
||||||
description="Switch",
|
description="Switch",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_punch = function (pos, node)
|
on_rightclick = function (pos, node)
|
||||||
if(mesecon.flipstate(pos, node) == "on") then
|
if(mesecon.flipstate(pos, node) == "on") then
|
||||||
mesecon.receptor_on(pos)
|
mesecon.receptor_on(pos)
|
||||||
else
|
else
|
||||||
|
@ -15,7 +15,7 @@ mesecon.register_node("mesecons_walllever:wall_lever", {
|
|||||||
fixed = { -8/16, -8/16, 3/16, 8/16, 8/16, 8/16 },
|
fixed = { -8/16, -8/16, 3/16, 8/16, 8/16, 8/16 },
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
on_punch = function (pos, node)
|
on_rightclick = function (pos, node)
|
||||||
if(mesecon.flipstate(pos, node) == "on") then
|
if(mesecon.flipstate(pos, node) == "on") then
|
||||||
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user