mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-26 21:03:45 +01:00
Don't make farmland dry while it rains
parent
7a64990ffa
commit
5dbf2beb6a
@ -3,4 +3,5 @@ mcl_sounds
|
|||||||
bucket
|
bucket
|
||||||
mcl_wool
|
mcl_wool
|
||||||
mcl_torches
|
mcl_torches
|
||||||
|
weather_pack
|
||||||
doc?
|
doc?
|
||||||
|
@ -84,9 +84,16 @@ minetest.register_abm({
|
|||||||
node.name = "mcl_farming:soil_wet"
|
node.name = "mcl_farming:soil_wet"
|
||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
else
|
else -- No water nearby.
|
||||||
-- Decay if no water is nearby.
|
-- The decay branch (make farmland dry or turn back to dirt)
|
||||||
-- But not near unloaded areas since thse might include water.
|
|
||||||
|
-- Don't decay while it's raining
|
||||||
|
if rain.raining then
|
||||||
|
if weather.is_outdoor(pos) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- No decay near unloaded areas since these might include water.
|
||||||
if not check_surroundings(pos, "ignore") then
|
if not check_surroundings(pos, "ignore") then
|
||||||
if wet <= 0 then
|
if wet <= 0 then
|
||||||
local n_def = minetest.registered_nodes[node.name] or nil
|
local n_def = minetest.registered_nodes[node.name] or nil
|
||||||
|
Loading…
Reference in New Issue
Block a user