remove perlin generated ores

master
NatureFreshMilk 2019-06-28 10:19:48 +02:00
parent 639ebb1776
commit ccf9e28767
3 changed files with 1 additions and 54 deletions

View File

@ -3,8 +3,7 @@ planetoids = {
miny = tonumber(minetest.settings:get("planetoids.miny")) or 6000,
maxy = tonumber(minetest.settings:get("planetoids.maxy")) or 10000,
debug = minetest.settings:get("planetoids.debug") or false,
min_chance = 1,
ores = {}
min_chance = 0.85,
}

View File

@ -53,12 +53,6 @@ planetoids.mapgen_oreplanet = function(minp, maxp, vm, area)
-- planet
data[index] = c_base
for _,ore in pairs(planetoids.ores) do
if planet_n > ore.chance then
data[index] = ore.id
break
end
end
end
end

View File

@ -1,46 +0,0 @@
local register_ore = function(def)
table.insert(planetoids.ores, def)
planetoids.min_chance = math.min(def.chance, planetoids.min_chance)
end
register_ore({
id = minetest.get_content_id("default:lava_source"),
chance = 1.16
})
register_ore({
id = minetest.get_content_id("default:stone_with_mese"),
chance = 1.1
})
register_ore({
id = minetest.get_content_id("default:stone_with_iron"),
chance = 1.0
})
register_ore({
id = minetest.get_content_id("default:stone_with_gold"),
chance = 0.99
})
register_ore({
id = minetest.get_content_id("default:stone_with_copper"),
chance = 0.98
})
register_ore({
id = minetest.get_content_id("default:ice"),
chance = 0.9
})
register_ore({
id = minetest.get_content_id("default:stone"),
chance = 0.85
})
-- sort ores
table.sort(planetoids.ores, function(a,b)
return b.chance < a.chance
end)