mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +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,14 +283,20 @@ mcl_end.grow_chorus_plant_step = function(pos, node)
|
|||
|
||||
for _, f in ipairs(new_flowers) do
|
||||
if age >= MAX_FLOWER_AGE then
|
||||
local nn = minetest.get_node(f).name
|
||||
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
|
||||
local nn = minetest.get_node(f).name
|
||||
if nn ~= "mcl_end:chorus_flower" and nn ~= "mcl_end:chorus_flower_dead" then
|
||||
minetest.set_node(f, {name="mcl_end:chorus_flower", param2 = age})
|
||||
table.insert(new_flower_buds, f)
|
||||
grown = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if #new_flowers >= 1 then
|
||||
minetest.set_node(pos, {name="mcl_end:chorus_plant"})
|
||||
grown = true
|
||||
|
|
Loading…
Reference in a new issue