summaryrefslogtreecommitdiff
path: root/mapgen.lua
diff options
context:
space:
mode:
authorroot <root@linux-forks.de>2018-11-14 12:45:10 +0100
committerroot <root@linux-forks.de>2018-11-14 12:45:10 +0100
commit070c5dd08e9652cd540542b860d5a5cce1f8c7d4 (patch)
tree55b8404d46f195a38bb34a470290a9cacd4b75bd /mapgen.lua
parent31fe2ff374e72fb8ea44d50cd82d6fc8b9be5463 (diff)
parentb29634b3632aebe6c21d035884ed454cfd7ce77a (diff)
Merge branch 'master' of https://notabug.org/TenPlus1/etherealHEADmaster
Diffstat (limited to 'mapgen.lua')
-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"})