From 265912f9da550fde408865ea8aca71bd294650cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Brada?= Date: Sat, 10 Jan 2015 16:05:32 +0100 Subject: [PATCH] Removed debugging shit. --- geologica.lua | 4 ++-- init.lua | 2 +- mapgen.lua | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/geologica.lua b/geologica.lua index f5d894a..e5d09ff 100644 --- a/geologica.lua +++ b/geologica.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=-40, limit=2, seed=1 }, "rocks:granite") +rocks.register_layer( "granite",{ gain=20, height=-45, limit=2, seed=1 }, "rocks:granite") -- Diorite In/Inter vhard Below granite minetest.register_node( "rocks:diorite", { @@ -64,7 +64,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=20, height=-5, limit=2, seed=4 }, "rocks:mudstone") +rocks.register_layer( "mudstone",{ gain=6, height=-10, limit=2, seed=4 }, "rocks:mudstone") -- Slate MM/barro med Under mud/clay/siltstone -- Schist MM/barro med Under slate, sometimes igneous diff --git a/init.lua b/init.lua index 2e5b636..5cdfbbb 100644 --- a/init.lua +++ b/init.lua @@ -14,7 +14,7 @@ dofile(modpath.."/register.lua") rocks.noiseparams_layers = { offset = 0, scale = 1, - spread = {x=30, y=30, z=30}, + spread = {x=300, y=300, z=300}, octaves = 3, persist = 0.63 } diff --git a/mapgen.lua b/mapgen.lua index e1edb25..5131ac5 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -37,9 +37,11 @@ local function mkheightmap(layers,x,z,minp,maxp) end local stonectx=nil +local airctx=nil minetest.register_on_generated(function(minp, maxp, seed) if not stone_ctx then stone_ctx= minetest.get_content_id("default:stone") end + if not air_ctx then air_ctx= minetest.get_content_id("air") end -- noise values range (-1;+1) (1 octave) -- 3 octaves it is like 1.7 max -- 4 octaves with 0.8 presist = 2.125 max !! @@ -55,7 +57,6 @@ minetest.register_on_generated(function(minp, maxp, seed) for z=minp.z,maxp.z,1 do --* initialize layers hmap local layers=mkheightmap(availlayers,x,z,minp,maxp) - if (minp.x>0)and(minp.x<200) then layers=nil end --< debug if layers then for y=minp.y,maxp.y,1 do local p_pos = area:index(x, y, z) @@ -112,7 +113,7 @@ minetest.register_on_generated(function(minp, maxp, seed) rock.ctx=minetest.get_content_id(rock.node) end nodes[p_pos] = rock.ctx - -- if minp.x>0 then nodes[p_pos]=0 end + -- if minp.x>0 then nodes[p_pos]=air_ctx end -- debug end perlin_index =perlin_index+1 @@ -125,3 +126,4 @@ minetest.register_on_generated(function(minp, maxp, seed) manipulator:write_to_map() print("[rocks] gen "..os.clock()-timebefore) end) +