Skip to content

Commit 85f2f3f

Browse files
committedDec 2, 2013
Merge pull request #126 from qwrwed/master
change on_punch to on_rightclick, make disabled blinky plants drop norma...
2 parents 16b4b79 + 711c73a commit 85f2f3f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed
 

‎mesecons_blinkyplant/init.lua

+10-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant", {
55
tiles = {"jeija_blinky_plant_off.png"},
66
inventory_image = "jeija_blinky_plant_off.png",
77
walkable = false,
8-
groups = {snappy=3, not_in_creative_inventory=1},
8+
groups = {dig_immediate=3, not_in_creative_inventory=1},
9+
drop="mesecons_blinkyplant:blinky_plant_off 1",
910
description="Deactivated Blinky Plant",
1011
sounds = default.node_sound_leaves_defaults(),
1112
selection_box = {
@@ -15,7 +16,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant", {
1516
mesecons = {receptor = {
1617
state = mesecon.state.off
1718
}},
18-
on_punch = function(pos, node, puncher)
19+
on_rightclick = function(pos, node, clicker)
1920
minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant_off"})
2021
end
2122
})
@@ -27,8 +28,8 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
2728
inventory_image = "jeija_blinky_plant_off.png",
2829
paramtype = "light",
2930
walkable = false,
30-
groups = {snappy=3, mesecon = 2},
31-
description="Blinky Plant",
31+
groups = {dig_immediate=3, mesecon=2},
32+
description="Blinky Plant",
3233
sounds = default.node_sound_leaves_defaults(),
3334
selection_box = {
3435
type = "fixed",
@@ -37,7 +38,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
3738
mesecons = {receptor = {
3839
state = mesecon.state.off
3940
}},
40-
on_punch = function(pos, node, puncher)
41+
on_rightclick = function(pos, node, clicker)
4142
minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant"})
4243
end
4344
})
@@ -49,7 +50,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
4950
inventory_image = "jeija_blinky_plant_off.png",
5051
paramtype = "light",
5152
walkable = false,
52-
groups = {snappy=3, not_in_creative_inventory=1, mesecon = 2},
53+
groups = {dig_immediate=3, not_in_creative_inventory=1, mesecon=2},
5354
drop="mesecons_blinkyplant:blinky_plant_off 1",
5455
light_source = LIGHT_MAX-7,
5556
description = "Blinky Plant",
@@ -61,9 +62,9 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
6162
mesecons = {receptor = {
6263
state = mesecon.state.on
6364
}},
64-
on_punch = function(pos, node, puncher)
65-
minetest.swap_node(pos, {name = "mesecons_blinkyplant:blinky_plant"})
66-
mesecon:receptor_off(pos)
65+
on_rightclick = function(pos, node, clicker)
66+
minetest.set_node(pos, {name = "mesecons_blinkyplant:blinky_plant"})
67+
mesecon:receptor_off(pos)
6768
end
6869
})
6970

0 commit comments

Comments
 (0)
Please sign in to comment.