summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-11-19 10:41:05 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-11-19 10:41:05 +0000
commitdd6812afa4b429cc83d20df764037c4fbcee113a (patch)
tree0817f458094e7db8a42cd56a4e45b005e64bd760
parent02b1c4c235ffeb14277babf5f55aa810d4ca5f9c (diff)
fixed bug thanks to orbea
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 9e8b175..dc75fd7 100644
--- a/init.lua
+++ b/init.lua
@@ -245,7 +245,7 @@ local function check_soil(pos, nodename, strength)
end
else
-- place random grass (common)
- nod = grass[math.random(1, #grass)] or ""
+ nod = #grass > 0 and grass[math.random(1, #grass)] or ""
if nod ~= "" then
minetest.set_node(pos2, {name = nod})
end