2015-04-02 00:35:35 +02:00
|
|
|
--
|
|
|
|
-- Igneous Layer
|
|
|
|
--
|
|
|
|
|
2015-04-02 20:17:56 +02:00
|
|
|
-- Basalt Ex/Mafic hard same as diorite, byt limit=0.5
|
|
|
|
minetest.register_node( "rocks:basalt", {
|
|
|
|
description = S("Basalt"),
|
|
|
|
tiles = { "rocks_Basalt.png" },
|
|
|
|
groups = {cracky=3, stone=1},
|
|
|
|
is_ground_content = true, sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
2015-04-19 12:19:02 +02:00
|
|
|
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.
|
2015-04-02 00:35:35 +02:00
|
|
|
|
2015-04-02 20:17:56 +02:00
|
|
|
-- more rock defs
|
|
|
|
minetest.register_node( "rocks:granite", {
|
|
|
|
description = S("Granite"),
|
|
|
|
tiles = { "rocks_Granite.png" },
|
|
|
|
is_ground_content = true, sounds = default.node_sound_stone_defaults(),
|
|
|
|
groups = {cracky=3, stone=1},
|
|
|
|
})
|
|
|
|
minetest.register_node( "rocks:diorite", {
|
|
|
|
description = S("Diorite"),
|
|
|
|
tiles = { "rocks_Diorite.png" },
|
|
|
|
groups = {cracky=3, stone=1},
|
|
|
|
is_ground_content = true, sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
minetest.register_node( "rocks:gabbro", {
|
|
|
|
description = S("Gabbro"),
|
|
|
|
tiles = { "rocks_Gabbro.png" },
|
|
|
|
groups = {cracky=3, stone=1},
|
|
|
|
is_ground_content = true, sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
2015-04-02 00:35:35 +02:00
|
|
|
|
|
|
|
local reg=function(name,param)
|
2015-04-19 12:19:02 +02:00
|
|
|
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(),
|
|
|
|
},
|
|
|
|
})
|
2015-04-02 00:35:35 +02:00
|
|
|
end
|
2015-04-04 00:10:37 +02:00
|
|
|
rocks.register_igneous_stratus=reg
|
2015-04-02 00:35:35 +02:00
|
|
|
|
|
|
|
-- rock registration
|
2015-04-03 16:06:45 +02:00
|
|
|
reg("rocks:granite", { spread=40, height=32, treshold=0.06})
|
|
|
|
reg("rocks:diorite", { spread=40, height=32, treshold=0.23})
|
|
|
|
reg("rocks:gabbro", { spread=40, height=32, treshold=0.36})
|
2015-04-02 00:35:35 +02:00
|
|
|
|
2015-04-03 21:32:20 +02:00
|
|
|
-- vein stuff
|
2015-04-04 00:10:37 +02:00
|
|
|
|
2015-04-19 12:19:02 +02:00
|
|
|
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
|
2015-04-10 19:30:36 +02:00
|
|
|
|
|
|
|
rocks.register_vein("default:nyancat",{
|
2015-04-19 12:19:02 +02:00
|
|
|
wherein={"rocks:granite", "air"},
|
2015-04-04 00:10:37 +02:00
|
|
|
miny=-160, maxy=20,
|
2015-04-19 12:19:02 +02:00
|
|
|
radius={ average=10, amplitude=0.1, frequency=8 },
|
2015-04-10 19:30:36 +02:00
|
|
|
density=100,
|
2015-04-19 12:19:02 +02:00
|
|
|
rarity=70, -- this^3*mapblock_volume veins per mapblock
|
2015-04-10 16:58:33 +02:00
|
|
|
ores={
|
|
|
|
{ ore="default:sand", percent=30 },
|
|
|
|
{ ore="default:dirt", percent=30 },
|
|
|
|
}
|
2015-04-04 00:10:37 +02:00
|
|
|
})
|
|
|
|
|
2015-04-03 21:32:20 +02:00
|
|
|
|
2015-04-02 00:35:35 +02:00
|
|
|
-- ~ Tomas Brod
|