forked from nalc/nalc_game
Expose generate_ore
This commit is contained in:
parent
a0ba7cf973
commit
97db50a2fe
|
@ -29,7 +29,7 @@ minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
|
|||
-- Ore generation
|
||||
--
|
||||
|
||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||
function default.generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||
if maxp.y < height_min or minp.y > height_max then
|
||||
return
|
||||
end
|
||||
|
@ -142,17 +142,17 @@ end
|
|||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
-- Generate regular ores
|
||||
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+0, 1/8/8/8, 3, 8, -31000, 64)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/12/12/12, 2, 3, -15, 2)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/9/9/9, 3, 5, -63, -16)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
|
||||
default.generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+0, 1/8/8/8, 3, 8, -31000, 64)
|
||||
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/12/12/12, 2, 3, -15, 2)
|
||||
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/9/9/9, 3, 5, -63, -16)
|
||||
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
|
||||
|
||||
generate_ore("default:stone_with_mese", "default:stone", minp, maxp, seed+4, 1/16/16/16, 2, 3, -127, -64)
|
||||
generate_ore("default:stone_with_mese", "default:stone", minp, maxp, seed+5, 1/9/9/9, 3, 5, -31000, -128)
|
||||
generate_ore("default:mese", "default:stone", minp, maxp, seed+8, 1/16/16/16, 2, 3, -31000,-1024)
|
||||
default.generate_ore("default:stone_with_mese", "default:stone", minp, maxp, seed+4, 1/16/16/16, 2, 3, -127, -64)
|
||||
default.generate_ore("default:stone_with_mese", "default:stone", minp, maxp, seed+5, 1/9/9/9, 3, 5, -31000, -128)
|
||||
default.generate_ore("default:mese", "default:stone", minp, maxp, seed+8, 1/16/16/16, 2, 3, -31000,-1024)
|
||||
|
||||
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)
|
||||
default.generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
|
||||
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)
|
||||
|
||||
if maxp.y >= 2 and minp.y <= 0 then
|
||||
-- Generate clay
|
||||
|
|
Loading…
Reference in New Issue
Block a user