mirror of
git://repo.or.cz/rocks.git
synced 2025-01-01 14:00:30 +01:00
Re-enabled igneous formations and nyancat test vein.
This commit is contained in:
parent
0fde0e8f15
commit
093310ed4b
68
ign.lua
68
ign.lua
@ -2,24 +2,6 @@
|
||||
-- Igneous Layer
|
||||
--
|
||||
|
||||
local ign={
|
||||
name="ign",
|
||||
top={
|
||||
offset = -10, scale = 0,
|
||||
spread = {x=80, y=80, z=80},
|
||||
octaves = 0, persist = 0 },
|
||||
bot={
|
||||
offset = -180, scale = 10, seed=rocksl.GetNextSeed(),
|
||||
spread = {x=80, y=80, z=80},
|
||||
octaves = 2, persist = 0.7 },
|
||||
primary={ name="rocks:basalt" },
|
||||
localized={},
|
||||
stats={ count=0, total=0, node={}, totalnodes=0 },
|
||||
debugging=nil
|
||||
}
|
||||
|
||||
rocks.layer_initialize(ign)
|
||||
|
||||
-- Basalt Ex/Mafic hard same as diorite, byt limit=0.5
|
||||
minetest.register_node( "rocks:basalt", {
|
||||
description = S("Basalt"),
|
||||
@ -27,6 +9,10 @@ minetest.register_node( "rocks:basalt", {
|
||||
groups = {cracky=3, stone=1},
|
||||
is_ground_content = true, sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_alias("mapgen_stone", "rocks:basalt")
|
||||
|
||||
-- ^ does not work. Seems we can not overwrite an alias.
|
||||
-- If the alias in default/mapgen.lua is deleted, this works.
|
||||
|
||||
-- more rock defs
|
||||
minetest.register_node( "rocks:granite", {
|
||||
@ -49,7 +35,22 @@ minetest.register_node( "rocks:gabbro", {
|
||||
})
|
||||
|
||||
local reg=function(name,param)
|
||||
rocksl.register_stratus(ign,name,param)
|
||||
minetest.register_ore({
|
||||
ore = name,
|
||||
wherein= { "mapgen_stone" },
|
||||
ore_type = "scatter",
|
||||
clust_scarcity = 10^3,
|
||||
clust_num_ores = 20^3,
|
||||
clust_size = 20,
|
||||
height_min = -31000,
|
||||
height_max = -5,
|
||||
noise_treshhold=param.treshold,
|
||||
noise_params={
|
||||
offset = 0, scale = 1, octaves = 3, persist = 0.5,
|
||||
spread = {x=param.spread, y=param.height, z=param.spread},
|
||||
seed=rocksl.GetNextSeed(),
|
||||
},
|
||||
})
|
||||
end
|
||||
rocks.register_igneous_stratus=reg
|
||||
|
||||
@ -59,16 +60,35 @@ rocks.register_igneous_stratus=reg
|
||||
reg("rocks:gabbro", { spread=40, height=32, treshold=0.36})
|
||||
|
||||
-- vein stuff
|
||||
ign.veins={}
|
||||
|
||||
local regv=rocks.register_vein
|
||||
local regv=function(name,param)
|
||||
minetest.log("error","stub called, rocks.register_vein")
|
||||
minetest.register_ore({
|
||||
ore = name,
|
||||
wherein= param.wherein,
|
||||
ore_type = "blob",
|
||||
clust_scarcity = param.rarity^3,
|
||||
clust_num_ores = 8,
|
||||
clust_size = 10*2,
|
||||
height_min = -31000,
|
||||
height_max = 50,
|
||||
noise_threshhold = 0.5, --< determined experimentally
|
||||
noise_params={
|
||||
offset = 1-param.radius.amplitude, scale = param.radius.amplitude, octaves = 3, persist = 0.5,
|
||||
spread = {x=param.radius.frequency, y=param.radius.frequency, z=param.radius.frequency},
|
||||
seed=rocksl.GetNextSeed(),
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
rocks.register_vein=regv
|
||||
|
||||
rocks.register_vein("default:nyancat",{
|
||||
wherein={"rocks:granite"},
|
||||
wherein={"rocks:granite", "air"},
|
||||
miny=-160, maxy=20,
|
||||
radius={ average=10, amplitude=4, frequency=8 },
|
||||
radius={ average=10, amplitude=0.1, frequency=8 },
|
||||
density=100,
|
||||
rarity=0.0025, -- this^3*mapblock_volume veins per mapblock
|
||||
rarity=70, -- this^3*mapblock_volume veins per mapblock
|
||||
ores={
|
||||
{ ore="default:sand", percent=30 },
|
||||
{ ore="default:dirt", percent=30 },
|
||||
|
Loading…
Reference in New Issue
Block a user