mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-16 07:20:27 +02:00
fix puzzle seal formspec for mcl
This commit is contained in:
@ -53,6 +53,14 @@ local wave_mult = 10
|
||||
local y_max = median + 2*wave_mult + -2*ceiling_mult + ceiling_displace
|
||||
local y_min = median - 2*wave_mult - 2*floor_mult + floor_displace
|
||||
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y > y_max or pos.y < y_min then
|
||||
return
|
||||
end
|
||||
-- TODO: account for perlin noise
|
||||
return "lava_sea"
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
--if out of range of cave definition limits, abort
|
||||
if minp.y > y_max or maxp.y < y_min then
|
||||
|
@ -46,7 +46,7 @@ local get_biome = function(heat, humidity)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(df_caverns.get_biome_at_pos_list, function(pos, heat, humidity)
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.level1_min or pos.y > df_caverns.config.ymax then
|
||||
return nil
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ local get_biome = function(heat, humidity)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(df_caverns.get_biome_at_pos_list, function(pos, heat, humidity)
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.level2_min or pos.y >= df_caverns.config.level1_min then
|
||||
return nil
|
||||
end
|
||||
|
@ -41,7 +41,7 @@ local get_biome = function(heat, humidity)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(df_caverns.get_biome_at_pos_list, function(pos, heat, humidity)
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.level3_min or pos.y >= df_caverns.config.level2_min then
|
||||
return nil
|
||||
end
|
||||
|
@ -46,6 +46,14 @@ local c_lava_set
|
||||
local y_max = median + 2*wave_mult + 2*ceiling_mult + ceiling_displace
|
||||
local y_min = median - 2*wave_mult + 2*floor_mult + floor_displace
|
||||
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y > y_max or pos.y < y_min then
|
||||
return
|
||||
end
|
||||
-- TODO: account for perlin noise
|
||||
return "oil_sea"
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
--if out of range of cave definition limits, abort
|
||||
if minp.y > y_max or maxp.y < y_min then
|
||||
|
@ -29,7 +29,7 @@ local perlin_wave_primordial = {
|
||||
|
||||
local giant_mycelium_timer_spread = tonumber(minetest.settings:get("dcaverns_giant_mycelium_timer_spread")) or 10
|
||||
|
||||
table.insert(df_caverns.get_biome_at_pos_list, function(pos, heat, humidity)
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.primordial_min or pos.y > df_caverns.config.primordial_max then
|
||||
return nil
|
||||
end
|
||||
|
@ -23,11 +23,14 @@ local c_webs_egg = df_caverns.node_id.big_webs_egg
|
||||
|
||||
df_caverns.data_param2 = {} -- shared among all mapgens to reduce memory clutter
|
||||
|
||||
df_caverns.get_biome_at_pos_list = {} -- a list of methods of the form function(pos, heat, humidity) to allow modpack-wide queries about what should grow where
|
||||
local get_biome_at_pos_list = {} -- a list of methods of the form function(pos, heat, humidity) to allow modpack-wide queries about what should grow where
|
||||
df_caverns.register_biome_check = function(func)
|
||||
table.insert(get_biome_at_pos_list, func)
|
||||
end
|
||||
df_caverns.get_biome = function(pos)
|
||||
local heat = minetest.get_heat(pos)
|
||||
local humidity = minetest.get_humidity(pos)
|
||||
for _, val in pairs(df_caverns.get_biome_at_pos_list) do
|
||||
for _, val in pairs(get_biome_at_pos_list) do
|
||||
local biome = val(pos, heat, humidity)
|
||||
if biome ~= nil then
|
||||
return biome
|
||||
|
@ -99,7 +99,7 @@ local hot_zone_boundary = 70
|
||||
local middle_zone_boundary = 50
|
||||
local cool_zone_boundary = 30
|
||||
|
||||
table.insert(df_caverns.get_biome_at_pos_list, function(pos, heat, humidity)
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.sunless_sea_min or pos.y >= df_caverns.config.level3_min then
|
||||
return nil
|
||||
end
|
||||
|
@ -333,6 +333,14 @@ minetest.register_chatcommand("find_pit", {
|
||||
end,
|
||||
})
|
||||
|
||||
df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y > y_max or pos.y < y_min then
|
||||
return
|
||||
end
|
||||
-- TODO: account for perlin noise
|
||||
return "underworld"
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
||||
--if out of range of cave definition limits, abort
|
||||
|
Reference in New Issue
Block a user