summaryrefslogtreecommitdiff
path: root/mesecons_blinkyplant
diff options
context:
space:
mode:
authorqwrwed <razk182@gmail.co.uk>2013-12-02 17:50:00 +0000
committerqwrwed <razk182@gmail.co.uk>2013-12-02 17:50:00 +0000
commit711c73a197a27d2df154f76d335c9e07c66eb541 (patch)
tree4a1b61cdef35b37ff6c21a335256afc6da102246 /mesecons_blinkyplant
parent16b4b79c51719849588c49d1d47d9bcbc05533e4 (diff)
downloadmesecons-711c73a197a27d2df154f76d335c9e07c66eb541.tar
mesecons-711c73a197a27d2df154f76d335c9e07c66eb541.tar.gz
mesecons-711c73a197a27d2df154f76d335c9e07c66eb541.tar.bz2
mesecons-711c73a197a27d2df154f76d335c9e07c66eb541.tar.xz
mesecons-711c73a197a27d2df154f76d335c9e07c66eb541.zip
change on_punch to on_rightclick, make disabled blinky plants drop normal ones
Diffstat (limited to 'mesecons_blinkyplant')
-rw-r--r--mesecons_blinkyplant/init.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/mesecons_blinkyplant/init.lua b/mesecons_blinkyplant/init.lua
index 44c2acf..475d953 100644
--- a/mesecons_blinkyplant/init.lua
+++ b/mesecons_blinkyplant/init.lua
@@ -5,7 +5,8 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant", {
tiles = {"jeija_blinky_plant_off.png"},
inventory_image = "jeija_blinky_plant_off.png",
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",
sounds = default.node_sound_leaves_defaults(),
selection_box = {
@@ -15,7 +16,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant", {
mesecons = {receptor = {
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"})
end
})
@@ -27,8 +28,8 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
inventory_image = "jeija_blinky_plant_off.png",
paramtype = "light",
walkable = false,
- groups = {snappy=3, mesecon = 2},
- description="Blinky Plant",
+ groups = {dig_immediate=3, mesecon=2},
+ description="Blinky Plant",
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@@ -37,7 +38,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_off", {
mesecons = {receptor = {
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"})
end
})
@@ -49,7 +50,7 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
inventory_image = "jeija_blinky_plant_off.png",
paramtype = "light",
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",
light_source = LIGHT_MAX-7,
description = "Blinky Plant",
@@ -61,9 +62,9 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
mesecons = {receptor = {
state = mesecon.state.on
}},
- on_punch = function(pos, node, puncher)
- minetest.swap_node(pos, {name = "mesecons_blinkyplant:blinky_plant"})
- mesecon:receptor_off(pos)
+ on_rightclick = function(pos, node, clicker)
+ minetest.set_node(pos, {name = "mesecons_blinkyplant:blinky_plant"})
+ mesecon:receptor_off(pos)
end
})