Fix/more sandstone strata, testing new mapgen params

This commit is contained in:
paramat 2014-03-25 04:08:40 +00:00
parent 6c11296eba
commit 608332334f
2 changed files with 18 additions and 15 deletions

View File

@ -1,4 +1,4 @@
watershed 0.2.11 by paramat watershed 0.2.12 by paramat
For latest stable Minetest back to 0.4.8 For latest stable Minetest back to 0.4.8
Depends default Depends default
Licenses: code WTFPL Licenses: code WTFPL

View File

@ -1,30 +1,27 @@
-- watershed 0.2.11 by paramat -- watershed 0.2.12 by paramat
-- For latest stable Minetest and back to 0.4.8 -- For latest stable Minetest and back to 0.4.8
-- Depends default -- Depends default
-- License: code WTFPL -- License: code WTFPL
-- 0.2.11 -- 0.2.12 tune TERCEN, TERSCA and amplitudes
-- water special tiles re-added -- fixed and added more sandstone strata
-- import jungletrees from rainforest mod
-- XLSAMP set, TERCEN reset, for continent / archipelago testing
-- TODO -- TODO
-- fog -- fog
-- singlenode y = 0 realm option -- singlenode y = 0 realm option. on spawnplayer teleport to surface, how?
-- lava, it's own tapering fissure system? -- magma with it's own tapering conduit system ... creates vents at the surface
-- Parameters -- Parameters
local YMIN = 6000 -- Approximate base of realm stone local YMIN = 6000 -- Approximate base of realm stone
local YMAX = 8000 -- Approximate top of atmosphere / mountains / floatlands local YMAX = 8000 -- Approximate top of atmosphere / mountains / floatlands
local TERCEN = 6864 -- Terrain 'centre', average seabed level local TERCEN = 6784 -- Terrain 'centre', average seabed level
local YWAT = 7024 -- Sea level local YWAT = 7024 -- Sea level
local YCLOUD = 7152 -- Cloud level local YCLOUD = 7152 -- Cloud level
local TERSCA = 384 -- Vertical terrain scale local TERSCA = 512 -- Vertical terrain scale
local XLSAMP = 0.4 -- Extra large scale height variation amplitude local XLSAMP = 0.2 -- Extra large scale height variation amplitude
local BASAMP = 0.4 -- Base terrain amplitude local BASAMP = 0.4 -- Base terrain amplitude
local CANAMP = 0.6 -- Canyon terrain amplitude local CANAMP = 0.4 -- Canyon terrain amplitude
local CANEXP = 1.33 -- Canyon shape exponent local CANEXP = 1.33 -- Canyon shape exponent
local ATANAMP = 1.2 -- Arctan function amplitude, smaller = more and larger floatlands above ridges local ATANAMP = 1.2 -- Arctan function amplitude, smaller = more and larger floatlands above ridges
@ -256,6 +253,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local c_sandstone = minetest.get_content_id("default:sandstone") local c_sandstone = minetest.get_content_id("default:sandstone")
local c_gravel = minetest.get_content_id("default:gravel") local c_gravel = minetest.get_content_id("default:gravel")
local c_clay = minetest.get_content_id("default:clay") local c_clay = minetest.get_content_id("default:clay")
local c_lava = minetest.get_content_id("default:lava_source")
local c_wswater = minetest.get_content_id("watershed:water") local c_wswater = minetest.get_content_id("watershed:water")
local c_wsstone = minetest.get_content_id("watershed:stone") local c_wsstone = minetest.get_content_id("watershed:stone")
@ -366,8 +364,13 @@ minetest.register_on_generated(function(minp, maxp, seed)
or (density >= tstone and density < TSTONE * 3 and densitybase >= triv ) then -- stone around river or (density >= tstone and density < TSTONE * 3 and densitybase >= triv ) then -- stone around river
local densitystr = nvals_strata[nixyz] / 4 + (TERCEN - y) / TERSCA local densitystr = nvals_strata[nixyz] / 4 + (TERCEN - y) / TERSCA
local densityper = densitystr - math.floor(densitystr) -- periodic strata 'density' local densityper = densitystr - math.floor(densitystr) -- periodic strata 'density'
if (densityper >= -0.1 and densityper <= -0.05) -- sandstone strata if (densityper >= 0 and densityper <= 0.04) -- sandstone strata
or (densityper >= 0.05 and densityper <= 0.1) then or (densityper >= 0.2 and densityper <= 0.23)
or (densityper >= 0.45 and densityper <= 0.47)
or (densityper >= 0.7 and densityper <= 0.73)
or (densityper >= 0.75 and densityper <= 0.77)
or (densityper >= 0.84 and densityper <= 0.87)
or (densityper >= 0.92 and densityper <= 0.95) then
data[vi] = c_sandstone data[vi] = c_sandstone
elseif biome == 6 and density < TSTONE * 3 then -- desert stone elseif biome == 6 and density < TSTONE * 3 then -- desert stone
data[vi] = c_wsredstone data[vi] = c_wsredstone