summaryrefslogtreecommitdiff
path: root/tomato.lua
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2015-11-25 22:25:41 -0800
committerAuke Kok <sofar@foo-projects.org>2015-11-25 22:25:41 -0800
commit5329ff5b369602918fbb70b61351b2d89ae440eb (patch)
treee733b404acb8d415aaacad51275d72dce72d1b7b /tomato.lua
parentf5908b08afddf6da3d569c2328fd61784da7a0c3 (diff)
Particle spawner on dead plants: flies.
These buzz around dead plants, right after they die.
Diffstat (limited to 'tomato.lua')
-rw-r--r--tomato.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/tomato.lua b/tomato.lua
index 77ab866..70603f3 100644
--- a/tomato.lua
+++ b/tomato.lua
@@ -85,8 +85,7 @@ minetest.register_node("crops:tomato_plant_5" , {
minetest.swap_node(pos, { name = "crops:tomato_plant_4"})
meta:set_int("crops_tomato_ttl", ttl - 1)
else
- minetest.swap_node(pos, { name = "crops:tomato_plant_6"})
- meta:set_int("crops_tomato_ttl", 0)
+ crops.die(pos)
end
end
})
@@ -162,8 +161,7 @@ minetest.register_abm({
minetest.swap_node(pos, { name = "crops:tomato_plant_5" })
meta:set_int("crops_tomato_ttl", ttl)
else
- -- no luck, plant dead!
- minetest.set_node(pos, { name = "crops:tomato_plant_6" })
+ crops.die(pos)
end
end
})