summaryrefslogtreecommitdiff
path: root/polebean.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 /polebean.lua
parentf5908b08afddf6da3d569c2328fd61784da7a0c3 (diff)
Particle spawner on dead plants: flies.
These buzz around dead plants, right after they die.
Diffstat (limited to 'polebean.lua')
-rw-r--r--polebean.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/polebean.lua b/polebean.lua
index ee1d22d..27eb854 100644
--- a/polebean.lua
+++ b/polebean.lua
@@ -97,8 +97,7 @@ local function crops_beanpole_on_dig(pos, node, digger)
for i = 1,math.random(3 - (2 * (damage / 100)),7 - (6 * (damage / 100))) do
table.insert(drops, "crops:green_bean")
end
- minetest.set_node(bottom, { name = "crops:beanpole_plant_base_6"})
- minetest.set_node(top, { name = "crops:beanpole_plant_top_4"})
+ crops.die(bottom)
elseif bottom_n.name == "crops:beanpole_plant_base_6" and top_n.name == "crops:beanpole_plant_top_4" then
-- harvested beans
for i = 1,math.random(3,4) do