Mapgen: write SuperUltraSigmaMapgen part 7.2

This commit is contained in:
Van
2025-11-23 21:22:33 +03:00
parent 18345682cc
commit 28e6b5fdf0
2 changed files with 11 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ function Cavern:new(name, def)
local _noise = {} -- note: must be nil until luanti mapgen objects are loaded. local _noise = {} -- note: must be nil until luanti mapgen objects are loaded.
if def.threshold == nil then if def.threshold == nil then
def.threshold = 0.0 def.threshold = 0.1
end end
local _groups local _groups
@@ -63,9 +63,9 @@ function Cavern:new(name, def)
end end
function instance:initNoise() function instance:initNoise()
--if not table.is_empty(_noise) then if not table.is_empty(_noise) then
-- minetest.log('warning', 'Cavern noise has already been initialized. Re-initialization is not recommended.') minetest.log('warning', 'Cavern noise has already been initialized. Re-initialization is not recommended.')
--end end
_noise = core.get_value_noise(_noiseParams) _noise = core.get_value_noise(_noiseParams)
end end

View File

@@ -17,8 +17,13 @@ dofile(core.get_modpath('smc__api__require')..'/init.lua')
-- Mod -- Mod
dofile(core.get_modpath('smc__api__mod')..'/init.lua') dofile(core.get_modpath('smc__api__mod')..'/init.lua')
-- TODO: исправить загрузку строковых библиотек (хотя они пока что не юзаются в мапгене)
-- Они не работают из-за get_current_modname внутри utf8
-- UTF-8
-- dofile(core.get_modpath('smc__api__utf8')..'/init.lua')
-- String -- String
dofile(core.get_modpath('smc__api__string')..'/init.lua') -- dofile(core.get_modpath('smc__api__string')..'/init.lua')
-- Table -- Table
dofile(core.get_modpath('smc__api__table')..'/init.lua') dofile(core.get_modpath('smc__api__table')..'/init.lua')
@@ -142,6 +147,7 @@ mapGenerator:registerCavern('world', 'cavern1', {
minY = -100, minY = -100,
maxY = -10, maxY = -10,
smoothDistance = 20, smoothDistance = 20,
threshold = 0.3,
noiseParams ={ noiseParams ={
offset = 0, offset = 0,
scale = 1, scale = 1,