Merge pull request #126 from qwrwed/master

change on_punch to on_rightclick, make disabled blinky plants drop norma...
This commit is contained in:
Anthony 2013-12-02 10:43:10 -08:00
commit 85f2f3f742

@ -5,7 +5,8 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant", {
tiles = {"jeija_blinky_plant_off.png"}, tiles = {"jeija_blinky_plant_off.png"},
inventory_image = "jeija_blinky_plant_off.png", inventory_image = "jeija_blinky_plant_off.png",
walkable = false, walkable = false,
groups = {snappy=3, not_in_creative_inventory=1}, groups = {dig_immediate=3, not_in_creative_inventory=1},
drop="mesecons_blinkyplant:blinky_plant_off 1",
description="Deactivated Blinky Plant", description="Deactivated Blinky Plant",
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
selection_box = { selection_box = {
@ -15,7 +16,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant", {
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.off state = mesecon.state.off
}}, }},
on_punch = function(pos, node, puncher) on_rightclick = function(pos, node, clicker)
minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant_off"}) minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant_off"})
end end
}) })
@ -27,7 +28,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
inventory_image = "jeija_blinky_plant_off.png", inventory_image = "jeija_blinky_plant_off.png",
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {snappy=3, mesecon = 2}, groups = {dig_immediate=3, mesecon=2},
description="Blinky Plant", description="Blinky Plant",
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
selection_box = { selection_box = {
@ -37,7 +38,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.off state = mesecon.state.off
}}, }},
on_punch = function(pos, node, puncher) on_rightclick = function(pos, node, clicker)
minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant"}) minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant"})
end end
}) })
@ -49,7 +50,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
inventory_image = "jeija_blinky_plant_off.png", inventory_image = "jeija_blinky_plant_off.png",
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {snappy=3, not_in_creative_inventory=1, mesecon = 2}, groups = {dig_immediate=3, not_in_creative_inventory=1, mesecon=2},
drop="mesecons_blinkyplant:blinky_plant_off 1", drop="mesecons_blinkyplant:blinky_plant_off 1",
light_source = LIGHT_MAX-7, light_source = LIGHT_MAX-7,
description = "Blinky Plant", description = "Blinky Plant",
@ -61,8 +62,8 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.on state = mesecon.state.on
}}, }},
on_punch = function(pos, node, puncher) on_rightclick = function(pos, node, clicker)
minetest.swap_node(pos, {name = "mesecons_blinkyplant:blinky_plant"}) minetest.set_node(pos, {name = "mesecons_blinkyplant:blinky_plant"})
mesecon:receptor_off(pos) mesecon:receptor_off(pos)
end end
}) })