From f0d193fcfdcbc77d3f4c400ec4ee377250aaba14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Brada?= Date: Tue, 10 Feb 2015 17:00:04 +0100 Subject: [PATCH] Add limestne and dolomite. --- geologicaLayers.lua | 24 ++++++++++++------------ geologicaStrata.lua | 41 ++++++++++++++++++++++++++++++----------- geologicaVeins.lua | 4 ++++ mapgen.lua | 1 + register.lua | 4 ++-- 5 files changed, 49 insertions(+), 25 deletions(-) diff --git a/geologicaLayers.lua b/geologicaLayers.lua index dab4f9b..c414b19 100644 --- a/geologicaLayers.lua +++ b/geologicaLayers.lua @@ -14,7 +14,7 @@ minetest.register_node( "rocks:granite", { is_ground_content = true, sounds = default.node_sound_stone_defaults(), groups = {cracky=CcStrong, stone=1}, }) -rocks.register_layer( "granite",{ gain=20, height=-55, limit=2, seed=1 }, "rocks:granite") +rocks.register_layer( "granite",{ gain=20, height=-22, limit=2, seed=1 }, "rocks:granite") -- Diorite In/Inter vhard Below granite minetest.register_node( "rocks:diorite", { @@ -23,7 +23,7 @@ minetest.register_node( "rocks:diorite", { groups = {cracky=CcHard, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "diorite",{ gain=20, height=-80, limit=2, seed=2 }, "rocks:diorite") +rocks.register_layer( "diorite",{ gain=20, height=-55, limit=2, seed=2 }, "rocks:diorite") -- Basalt Ex/Mafic hard same as diorite, byt limit=0.5 minetest.register_node( "rocks:basalt", { @@ -32,7 +32,7 @@ minetest.register_node( "rocks:basalt", { groups = {cracky=CcStrong, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "basalt",{ gain=20, height=-75, limit=-0.7, seed=2 }, "rocks:basalt") +rocks.register_layer( "basalt",{ gain=20, height=-60, limit=-0.7, seed=2 }, "rocks:basalt") -- Gabbro In/Mafic vhard Below basalt/diorite (mtns, ocean) minetest.register_node( "rocks:gabbro", { @@ -41,7 +41,7 @@ minetest.register_node( "rocks:gabbro", { groups = {cracky=CcHard, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "gabbro",{ gain=20, height=-120, limit=2, seed=3 }, "rocks:gabbro") +rocks.register_layer( "gabbro",{ gain=20, height=-70, limit=2, seed=3 }, "rocks:gabbro") -- Peridotite In/UMafic vhard Rarely under gabbro minetest.register_node( "rocks:peridotite", { @@ -50,7 +50,7 @@ minetest.register_node( "rocks:peridotite", { groups = {cracky=CcStrong, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "peridotite",{ gain=20, height=-130, limit=-0.8, seed=4 }, "rocks:peridotite") +rocks.register_layer( "peridotite",{ gain=20, height=-120, limit=-0.8, seed=4 }, "rocks:peridotite") -- Komatiite Ex/UMafic - Too deep minetest.register_node( "rocks:komatiite", { @@ -59,7 +59,7 @@ minetest.register_node( "rocks:komatiite", { groups = {cracky=CcHard, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "komatiite",{ gain=20, height=-200, limit=2, seed=5 }, "rocks:komatiite") +rocks.register_layer( "komatiite",{ gain=20, height=-130, limit=2, seed=5 }, "rocks:komatiite") -- -- top sedimentary rocks @@ -72,7 +72,7 @@ minetest.register_node( "rocks:mudstone", { groups = {cracky=CcSoft, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "mudstone",{ gain=10, height=-13, limit=2, seed=4 }, "rocks:mudstone") +rocks.register_layer( "mudstone",{ gain=10, height=10, limit=2, seed=4 }, "rocks:mudstone") -- Slate MM/barro med Under mud/clay/siltstone minetest.register_node( "rocks:slate", { @@ -81,7 +81,7 @@ minetest.register_node( "rocks:slate", { groups = {cracky=CcMed, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "slate",{ gain=10, height=-15, limit=2, seed=5 }, "rocks:slate") +-- rocks.register_layer( "slate",{ gain=10, height=-7, limit=2, seed=5 }, "rocks:slate") -- Schist MM/barro med Under slate, sometimes igneous minetest.register_node( "rocks:schist", { @@ -90,7 +90,7 @@ minetest.register_node( "rocks:schist", { groups = {cracky=CcMed, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "schist",{ gain=10, height=-18, limit=2, seed=5 }, "rocks:schist") +rocks.register_layer( "schist",{ gain=10, height=-15, limit=2, seed=5 }, "rocks:schist") -- Gneiss MM/barro hard Under schist, sometimes igneous minetest.register_node( "rocks:gneiss", { @@ -99,7 +99,7 @@ minetest.register_node( "rocks:gneiss", { groups = {cracky=CcStrong, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "gneiss",{ gain=10, height=-21, limit=2, seed=6 }, "rocks:gneiss") +rocks.register_layer( "gneiss",{ gain=10, height=-19, limit=2, seed=6 }, "rocks:gneiss") -- -- peak rocks @@ -112,7 +112,7 @@ minetest.register_node( "rocks:rhyolite", { groups = {cracky=CcHard, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "rhyolite",{ gain=8, height=22, limit=2, seed=4 }, "rocks:rhyolite") +rocks.register_layer( "rhyolite",{ gain=8, height=80, limit=2, seed=4 }, "rocks:rhyolite") -- Andesite Ex/Inter hard Mountains, below rhyolite minetest.register_node( "rocks:andesite", { @@ -121,6 +121,6 @@ minetest.register_node( "rocks:andesite", { groups = {cracky=CcHard, stone=1}, is_ground_content = true, sounds = default.node_sound_stone_defaults(), }) -rocks.register_layer( "andesite",{ gain=8, height=10, limit=2, seed=4 }, "rocks:andesite") +rocks.register_layer( "andesite",{ gain=8, height=22, limit=2, seed=4 }, "rocks:andesite") print("[rocks/geologicaLayers] loaded.") diff --git a/geologicaStrata.lua b/geologicaStrata.lua index 67e61ce..083a4c0 100644 --- a/geologicaStrata.lua +++ b/geologicaStrata.lua @@ -12,26 +12,45 @@ rocks.register_vein("clay",{ spread = {x=30, y=10, z=30}, treshold=0.2, -- clay should be plenty seed = 9, - hmin=-8, hmax=nil, layers={ "mudstone" }, }) rocks.register_ore( "clay", "default:clay", {treshold=0, chance=85 } ) -rocks.register_ore( "clay", "default:torch", {treshold=0, chance=15 } ) -- Breccia Mixture soft in mudstone -- Conglomerate Sed soft in mudstone --- Skarn MM/contact med in mudstone in mountains --- Hornfels MM/contact vhard in mudstone in mountains --- Marble MM/contact hard in mudstone in mountains + -- Limestone Sed med in Rhyolite, Andesite in mountains -rocks.register_vein("limestone",{ - spread = {x=10, y=10, z=10}, - treshold=0.75, - seed = 10, - hmin=nil, hmax=nil, - layers={ "mudstone" }, +minetest.register_node( "rocks:limestone", { + description = S("Limestone"), + tiles = { "rocks_Limestone.png" }, + is_ground_content = true, sounds = default.node_sound_stone_defaults(), + groups = {cracky=CcMed, stone=1}, }) +rocks.register_vein("limestone",{ + spread = {x=60, y=60, z=60}, + treshold=0.4, + seed = 10, + layers={ "rhyolite", "andesite" }, +}) +rocks.register_ore( "limestone", "rocks:limestone", {treshold=0, chance=100} ) +rocks.register_ore( "limestone", "default:torch", {treshold=0, chance=15 } ) + -- Dolomite Sed med in Rhyolite, Andesite in mountains +minetest.register_node( "rocks:dolomite", { + description = S("Dolomite"), + tiles = { "rocks_Dolomite.png" }, + is_ground_content = true, sounds = default.node_sound_stone_defaults(), + groups = {cracky=CcMed, stone=1}, +}) +rocks.register_vein("dolomite",{ + spread = {x=60, y=60, z=60}, + treshold=0.4, + seed = 11, + layers={ "rhyolite", "andesite" }, +}) +rocks.register_ore( "dolomite", "rocks:dolomite", {treshold=0, chance=100} ) +rocks.register_ore( "dolomite", "default:torch", {treshold=0, chance=15 } ) + -- Quartzite MM/contact vhard sandstone print("[rocks/geologicaStrata] loaded.") \ No newline at end of file diff --git a/geologicaVeins.lua b/geologicaVeins.lua index 0f77cc0..13ddb52 100644 --- a/geologicaVeins.lua +++ b/geologicaVeins.lua @@ -7,5 +7,9 @@ local CcSoft=3 -- Veins -- +-- Skarn MM/contact med in rhyo/ande in mountains +-- Hornfels MM/contact vhard in skarn +-- Marble MM/contact hard in skarn +-- Limestone Sed med in skarn print("[rocks/geologicaVeins] loaded.") diff --git a/mapgen.lua b/mapgen.lua index 601150e..baab9ba 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -87,6 +87,7 @@ minetest.register_on_generated(function(minp, maxp, seed) if vd.nmap[noise3d_ix]>vd.treshold then vein=vd --rock not changed + break end end end diff --git a/register.lua b/register.lua index b6b5860..59a8217 100644 --- a/register.lua +++ b/register.lua @@ -19,14 +19,14 @@ rocks.register_layer=function(name,params,rock) gain=params.gain, height=params.height, maxheight=maxheight, - limit=((params.limit or 2)*params.gain)+params.height, + limit=(params.limit*params.gain)+params.height, seed=params.seed or 0, rock={ node=rock }, veins={}, name=name } rocks.layers_name[name]= ld - print("[rocks] layer "..ld.name) + print("[rocks] layer "..ld.name.."height="..ld.height.." limit="..ld.limit) end rocks.register_vein=function(name,params)