summaryrefslogtreecommitdiff
path: root/mesecons_blinkyplant
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2012-06-04 22:20:04 -0400
committerAnthony Zhang <azhang9@gmail.com>2012-06-04 22:20:04 -0400
commit4200757ba3ac7f450a6b51592339aa62af905f0e (patch)
tree178110c383ac9b629c53ffddb745deacde870375 /mesecons_blinkyplant
parent95a84dde468f91a112993f8c1379ebca0362d95f (diff)
downloadmesecons-4200757ba3ac7f450a6b51592339aa62af905f0e.tar
mesecons-4200757ba3ac7f450a6b51592339aa62af905f0e.tar.gz
mesecons-4200757ba3ac7f450a6b51592339aa62af905f0e.tar.bz2
mesecons-4200757ba3ac7f450a6b51592339aa62af905f0e.tar.xz
mesecons-4200757ba3ac7f450a6b51592339aa62af905f0e.zip
Remove deprecated API functions "register_on_placenode" and "register_on_dignode" where possible.
Diffstat (limited to 'mesecons_blinkyplant')
-rw-r--r--mesecons_blinkyplant/init.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/mesecons_blinkyplant/init.lua b/mesecons_blinkyplant/init.lua
index 4797f6a..3e6adc2 100644
--- a/mesecons_blinkyplant/init.lua
+++ b/mesecons_blinkyplant/init.lua
@@ -21,7 +21,10 @@ minetest.register_node("mesecons_blinkyplant:blinky_plant_on", {
groups = {snappy=2},
drop='"mesecons_blinkyplant:blinky_plant_off" 1',
light_source = LIGHT_MAX-7,
- description="Blinky Plant",
+ description = "Blinky Plant",
+ after_dig_node = function(pos)
+ mesecon:receptor_off(pos)
+ end
})
minetest.register_craft({
@@ -59,11 +62,3 @@ minetest.register_abm({
mesecon:add_receptor_node("mesecons_blinkyplant:blinky_plant_on")
mesecon:add_receptor_node_off("mesecons_blinkyplant:blinky_plant_off")
-
-minetest.register_on_dignode(
- function(pos, oldnode, digger)
- if oldnode.name == "mesecons_blinkyplant:blinky_plant_on" then
- mesecon:receptor_off(pos)
- end
- end
-)