mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-05 23:33:51 +01:00
Flora spread: Do not replace flora with dry shrub, only 'return'
If there is no group:soil node found below, do not replace flora with dry shrub, this was breaking flower pots and other mods. Originally, flora would only turn to dry shrub if in desert sand.
This commit is contained in:
parent
86fd616f3c
commit
91182d6a9e
@ -107,10 +107,9 @@ function flowers.flower_spread(pos, node)
|
|||||||
pos.y = pos.y - 1
|
pos.y = pos.y - 1
|
||||||
local under = minetest.get_node(pos)
|
local under = minetest.get_node(pos)
|
||||||
pos.y = pos.y + 1
|
pos.y = pos.y + 1
|
||||||
if minetest.get_item_group(under.name, "soil") == 0 and
|
if minetest.get_item_group(under.name, "soil") == 0 then
|
||||||
-- Do not replace sand dune grasses
|
-- Do not replace with dry shrub here as
|
||||||
under.name ~= "default:sand" then
|
-- this breaks flower pots and other mods.
|
||||||
minetest.set_node(pos, {name = "default:dry_shrub"})
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user