remove perlin generated ores
parent
639ebb1776
commit
ccf9e28767
3
init.lua
3
init.lua
|
@ -3,8 +3,7 @@ planetoids = {
|
||||||
miny = tonumber(minetest.settings:get("planetoids.miny")) or 6000,
|
miny = tonumber(minetest.settings:get("planetoids.miny")) or 6000,
|
||||||
maxy = tonumber(minetest.settings:get("planetoids.maxy")) or 10000,
|
maxy = tonumber(minetest.settings:get("planetoids.maxy")) or 10000,
|
||||||
debug = minetest.settings:get("planetoids.debug") or false,
|
debug = minetest.settings:get("planetoids.debug") or false,
|
||||||
min_chance = 1,
|
min_chance = 0.85,
|
||||||
ores = {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,12 +53,6 @@ planetoids.mapgen_oreplanet = function(minp, maxp, vm, area)
|
||||||
|
|
||||||
-- planet
|
-- planet
|
||||||
data[index] = c_base
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
46
ores.lua
46
ores.lua
|
@ -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)
|
|
Loading…
Reference in New Issue