summaryrefslogtreecommitdiff
path: root/pumpkin.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 /pumpkin.lua
parentf5908b08afddf6da3d569c2328fd61784da7a0c3 (diff)
Particle spawner on dead plants: flies.
These buzz around dead plants, right after they die.
Diffstat (limited to 'pumpkin.lua')
-rw-r--r--pumpkin.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/pumpkin.lua b/pumpkin.lua
index 74b4464..a5d2754 100644
--- a/pumpkin.lua
+++ b/pumpkin.lua
@@ -197,8 +197,7 @@ minetest.register_abm({
minetest.swap_node(pos, {name = "crops:pumpkin_plant_5_attached", param2 = faces[r].r})
meta:set_int("crops_pumpkin_ttl", ttl - 1)
else
- -- no luck, plant dead!
- minetest.set_node(pos, { name = "crops:pumpkin_plant_6" })
+ crops.die(pos)
end
local water = meta:get_int("crops_water")
-- growing a pumpkin costs 25 water!
@@ -228,8 +227,7 @@ minetest.register_abm({
minetest.swap_node(pos, { name = "crops:pumpkin_plant_4" })
meta:set_int("crops_pumpkin_ttl", ttl)
else
- minetest.swap_node(pos, { name = "crops:pumpkin_plant_6"})
- meta:set_int("crops_pumpkin_ttl", 0)
+ crops.die(pos)
end
end
})