summaryrefslogtreecommitdiff
path: root/soil.lua
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2014-12-10 10:51:27 +0000
committertenplus1 <kinsellaja@yahoo.com>2014-12-10 10:51:27 +0000
commit9ffbbf4c0ed89078a8411e29a3de45aad8034205 (patch)
tree2a40ba53c20d5714be19da3fdea2e8261f57ea2e /soil.lua
parent47bee0ee4882d654d9d9737c7854dc8f1be99e48 (diff)
Update: added check for unloaded map
Diffstat (limited to 'soil.lua')
-rw-r--r--soil.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/soil.lua b/soil.lua
index b459273..e1863bc 100644
--- a/soil.lua
+++ b/soil.lua
@@ -44,6 +44,11 @@ minetest.register_abm({
minetest.set_node(pos, {name="default:dirt"})
end
+ -- if map around soil not loaded then skip until loaded
+ if minetest.find_node_near(pos, 3, {"ignore"}) then
+ return
+ end
+
-- check if there is water nearby and change soil accordingly
if minetest.find_node_near(pos, 3, {"group:water"}) then
if node.name == "farming:soil" then