mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Chorus plant: Prevent double placement of flowers
This commit is contained in:
parent
05e8cc8a2c
commit
655a240107
1 changed files with 11 additions and 5 deletions
|
@ -283,12 +283,18 @@ mcl_end.grow_chorus_plant_step = function(pos, node)
|
||||||
|
|
||||||
for _, f in ipairs(new_flowers) do
|
for _, f in ipairs(new_flowers) do
|
||||||
if age >= MAX_FLOWER_AGE then
|
if age >= MAX_FLOWER_AGE then
|
||||||
minetest.set_node(f, {name="mcl_end:chorus_flower_dead"})
|
local nn = minetest.get_node(f).name
|
||||||
grown = true
|
if nn ~= "mcl_end:chorus_flower" and nn ~= "mcl_end:chorus_flower_dead" then
|
||||||
|
minetest.set_node(f, {name="mcl_end:chorus_flower_dead"})
|
||||||
|
grown = true
|
||||||
|
end
|
||||||
else
|
else
|
||||||
minetest.set_node(f, {name="mcl_end:chorus_flower", param2 = age})
|
local nn = minetest.get_node(f).name
|
||||||
table.insert(new_flower_buds, f)
|
if nn ~= "mcl_end:chorus_flower" and nn ~= "mcl_end:chorus_flower_dead" then
|
||||||
grown = true
|
minetest.set_node(f, {name="mcl_end:chorus_flower", param2 = age})
|
||||||
|
table.insert(new_flower_buds, f)
|
||||||
|
grown = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #new_flowers >= 1 then
|
if #new_flowers >= 1 then
|
||||||
|
|
Loading…
Reference in a new issue