mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-01 13:08:05 +02:00
Make hard rooms (acid/concrete) only appear farther out from the center on upper levels
This commit is contained in:
parent
2114b8fea2
commit
ae963fd774
@ -47,6 +47,16 @@ local disabled_for_deconstruction = {
|
|||||||
['crash-site-spaceship-wreck-small-6'] = true
|
['crash-site-spaceship-wreck-small-6'] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local function enable_hard_rooms(position, surface_index)
|
||||||
|
dungeon_table = DungeonsTable.get_dungeontable()
|
||||||
|
floor = surface_index - dungeon_table.original_surface_index
|
||||||
|
floor_mindist = 200 - floor * 10
|
||||||
|
if floor_mindist < 80 then -- all dirtlands within this
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return position.x ^ 2 + position.y ^ 2 > floor_mindist^2
|
||||||
|
end
|
||||||
|
|
||||||
local function get_biome(position, surface_index)
|
local function get_biome(position, surface_index)
|
||||||
--if not a then return "concrete" end
|
--if not a then return "concrete" end
|
||||||
if position.x ^ 2 + position.y ^ 2 < 6400 then
|
if position.x ^ 2 + position.y ^ 2 < 6400 then
|
||||||
@ -64,13 +74,17 @@ local function get_biome(position, surface_index)
|
|||||||
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.60 then
|
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.60 then
|
||||||
return 'doom'
|
return 'doom'
|
||||||
end
|
end
|
||||||
a = a + 1
|
if enable_hard_rooms(position, surface_index) then
|
||||||
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.62 then
|
a = a + 1
|
||||||
return 'acid_zone'
|
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.62 then
|
||||||
end
|
return 'acid_zone'
|
||||||
a = a + 1
|
end
|
||||||
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.60 then
|
a = a + 1
|
||||||
return 'concrete'
|
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.60 then
|
||||||
|
return 'concrete'
|
||||||
|
end
|
||||||
|
else
|
||||||
|
a = a + 2
|
||||||
end
|
end
|
||||||
a = a + 1
|
a = a + 1
|
||||||
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.71 then
|
if Get_noise('dungeons', position, seed + seed_addition * a) > 0.71 then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user