mirror of
git://repo.or.cz/rocks.git
synced 2025-01-01 14:00:30 +01:00
Removed debugging shit.
This commit is contained in:
parent
d547a233e9
commit
265912f9da
@ -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
|
||||
|
2
init.lua
2
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
|
||||
}
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user