mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-05 23:33:51 +01:00
Dont dry out soil if unloaded blocks are nearby
This commit is contained in:
parent
20f938e44a
commit
22dd46dcc6
@ -113,6 +113,9 @@ minetest.register_abm({
|
|||||||
minetest.set_node(pos, {name = wet})
|
minetest.set_node(pos, {name = wet})
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
-- only turn back if there are no unloaded blocks (and therefore
|
||||||
|
-- possible water sources) nearby
|
||||||
|
if not minetest.find_node_near(pos, 3, {"ignore"}) then
|
||||||
-- turn it back into base if it is already dry
|
-- turn it back into base if it is already dry
|
||||||
if wet_lvl == 0 then
|
if wet_lvl == 0 then
|
||||||
-- only turn it back if there is no plant/seed on top of it
|
-- only turn it back if there is no plant/seed on top of it
|
||||||
@ -125,6 +128,7 @@ minetest.register_abm({
|
|||||||
minetest.set_node(pos, {name = dry})
|
minetest.set_node(pos, {name = dry})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user