summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-09-30 16:16:22 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-09-30 16:16:22 +0100
commitf94ea11e6b2001d3514940b66d7a37626ecccf40 (patch)
tree236b21380e56b23f8d1780f5fbb0e3cc044d0300
parent0108b98e82690d104d7e2b15786ba1c611c9e12b (diff)
tweak illumishroom generation
-rw-r--r--mapgen.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/mapgen.lua b/mapgen.lua
index 6968aa7..269d8a1 100644
--- a/mapgen.lua
+++ b/mapgen.lua
@@ -736,6 +736,8 @@ for _, row in pairs(list) do
end
+local random = math.random
+
-- Generate Illumishroom in caves next to coal
minetest.register_on_generated(function(minp, maxp)
@@ -749,9 +751,9 @@ minetest.register_on_generated(function(minp, maxp)
for n = 1, #coal do
- bpos = {x = coal[n].x, y = coal[n].y + 1, z = coal[n].z }
+ if random(1, 2) == 1 then
- if math.random(1, 2) == 1 then
+ bpos = {x = coal[n].x, y = coal[n].y + 1, z = coal[n].z }
if bpos.y > -3000 and bpos.y < -2000 then
minetest.swap_node(bpos, {name = "ethereal:illumishroom3"})