mirror of
https://codeberg.org/tenplus1/farming.git
synced 2024-12-28 11:40:16 +01:00
tweak soil dry abm
This commit is contained in:
parent
ad9b0dc255
commit
31c7b589c1
11
soil.lua
11
soil.lua
@ -173,11 +173,6 @@ minetest.register_abm({
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if map around soil not loaded then skip until loaded
|
|
||||||
if minetest.find_node_near(pos, 3, {"ignore"}) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if water is within 3 nodes
|
-- check if water is within 3 nodes
|
||||||
if minetest.find_node_near(pos, 3, {"group:water"}) then
|
if minetest.find_node_near(pos, 3, {"group:water"}) then
|
||||||
|
|
||||||
@ -186,7 +181,10 @@ minetest.register_abm({
|
|||||||
minetest.set_node(pos, {name = ndef.soil.wet})
|
minetest.set_node(pos, {name = ndef.soil.wet})
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif node.name == ndef.soil.wet then
|
-- only dry out soil if no unloaded blocks nearby, just incase
|
||||||
|
elseif not minetest.find_node_near(pos, 3, {"ignore"}) then
|
||||||
|
|
||||||
|
if node.name == ndef.soil.wet then
|
||||||
minetest.set_node(pos, {name = ndef.soil.dry})
|
minetest.set_node(pos, {name = ndef.soil.dry})
|
||||||
|
|
||||||
-- if crop or seed found don't turn to dry soil
|
-- if crop or seed found don't turn to dry soil
|
||||||
@ -196,4 +194,5 @@ minetest.register_abm({
|
|||||||
minetest.set_node(pos, {name = ndef.soil.base})
|
minetest.set_node(pos, {name = ndef.soil.base})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user