summaryrefslogtreecommitdiff
path: root/pumpkin.lua
diff options
context:
space:
mode:
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
})