[MIRROR] Chasm Hell On Icebox - 300 Active Turfs on Prod Moment [MDB IGNORE] (#20260)

* Chasm Hell On Icebox - 300 Active Turfs on Prod Moment (#74410)

## About The Pull Request

Spontaneous regressions introduced by #74359
(1e58c1875d).
```txt
 - Z-Level 2 has 150 active turf(s).
 - Z-Level 3 has 150 active turf(s).
 - Z-Level trait Ice Ruins Underground has 300 active turf(s).
 - Z-Level trait Mining has 300 active turf(s).
 - Z-Level trait Station has 300 active turf(s).
 - End of active turf list.
 ```

![image](https://user-images.githubusercontent.com/34697715/229213138-5a6a7a4f-edec-47ab-8def-ee4e4bddfe61.png)

Basically the lavaland ruin sucks dogshit and I had to do a lot of stuff to account for everything failing. There was even a moment where we were adding something to `flags_1` instead of `turf_flags` and that was also really bad to figure out.

![image](https://user-images.githubusercontent.com/34697715/229213428-63bb1f6e-6f88-4604-a3c6-e08e20cbfa7a.png)

i also had to add orange genturfs because it was really getting bad with all of the assertions we had to keep making, especially since stuff like this could also show up:

![image](https://user-images.githubusercontent.com/34697715/229213562-4a145453-5f90-4d05-b8cc-5c1beec2b0dd.png)

That's the prison in the red box, those are active turfs because a chasm scraped it away.

Sorry if this is hard to follow but I promise you everything in this is essential. I wish we didn't have to rely on turf flags as much as we do but this is a fix PR, not a refactor.
## Why It's Good For The Game

Even one active turf on IceBox ate up _three_ seconds of SSair's initialization every single time it was really fucking bad.

We haven't had to deal with chasms for about two years so there's a lot of mapping assertions we made since they just weren't a thing, but now they're back so lets do it properly.
## Changelog
🆑
fix: The prison on IceBox should no longer leak air as often.
/🆑

I have compiled this map about 30 times until active turfs stopped fucking happening and now I am content. This likely doesn't fix _everything_ because some stuff can still be hidden to me, and we still have PRs that need to be merged to reduce the amount of noise we're getting on prod.

* Chasm Hell On Icebox - 300 Active Turfs on Prod Moment

---------

Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
SkyratBot
2023-04-02 04:31:56 +02:00
committed by GitHub
parent 03d52fb4ec
commit c267799416
13 changed files with 1365 additions and 1312 deletions
@@ -17,7 +17,7 @@
/area/icemoon/underground)
"q" = (
/turf/open/genturf,
/area/lavaland/surface/outdoors/unexplored/danger)
/area/lavaland/surface/outdoors/unexplored/danger/no_ruins)
"w" = (
/obj/machinery/door/airlock/cult/friendly{
use_power = 0
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -96,7 +96,7 @@
new_turf = new new_turf(gen_turf)
if(gen_turf.turf_flags & NO_RUINS)
new_turf.flags_1 |= NO_RUINS
new_turf.turf_flags |= NO_RUINS
if(closed)//Open turfs have some special behavior related to spawning flora and mobs.
CHECK_TICK
@@ -39,3 +39,6 @@
smoothing_iterations = 50
birth_limit = 4
death_limit = 3
/datum/map_generator/cave_generator/lavaland/ruin_version
weighted_open_turf_types = list(/turf/open/misc/asteroid/basalt/lava_land_surface/no_ruins = 1)
+16 -11
View File
@@ -79,17 +79,6 @@
selected_biome.generate_turf(gen_turf)
CHECK_TICK
/turf/open/genturf
name = "ungenerated turf"
desc = "If you see this, and you're not a ghost, yell at coders"
icon = 'icons/turf/debug.dmi'
icon_state = "genturf"
/turf/open/genturf/alternative //currently used for edge cases in which you want a certain type of map generation intermingled with other genturfs
name = "alternative ungenerated turf"
desc = "If you see this, and you're not a ghost, yell at coders pretty loudly"
icon_state = "genturf_alternative"
/area/mine/planetgeneration
name = "planet generation area"
static_lighting = FALSE
@@ -97,4 +86,20 @@
map_generator = /datum/map_generator/jungle_generator
/// This turf doesn't actually do anything beyond provide contrast for mappers and be very visible when stuff breaks in game. The actual areas are what drive cave generation.
/turf/open/genturf
name = "green ungenerated turf"
desc = "If you see this, and you're not a ghost, yell at coders"
icon = 'icons/turf/debug.dmi'
icon_state = "genturf_green"
// following two are currently used for edge cases in which you want a certain type of map generation intermingled with other genturfs
/turf/open/genturf/blue
name = "blue ungenerated turf"
icon_state = "genturf_blue"
/turf/open/genturf/orange
name = "orange ungenerated turf"
icon_state = "genturf_orange"
#undef BIOME_RANDOM_SQUARE_DRIFT
+2 -2
View File
@@ -7,8 +7,8 @@
ruin_type = ZTRAIT_ICE_RUINS
default_area = /area/icemoon/surface/outdoors/unexplored
has_ceiling = TRUE
ceiling_turf = /turf/closed/mineral/random/snow
ceiling_baseturfs = list(/turf/open/misc/asteroid/snow/icemoon)
ceiling_turf = /turf/closed/mineral/random/snow/do_not_chasm
ceiling_baseturfs = list(/turf/open/misc/asteroid/snow/icemoon/do_not_chasm)
// above ground only
+9
View File
@@ -171,6 +171,10 @@
icon_state = "danger"
area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED
/// Same thing as parent, but uses a different map generator for the icemoon ruin that needs it.
/area/lavaland/surface/outdoors/unexplored/danger/no_ruins
map_generator = /datum/map_generator/cave_generator/lavaland/ruin_version
/area/lavaland/surface/outdoors/explored
name = "Lavaland Labor Camp"
area_flags = VALID_TERRITORY | UNIQUE_AREA
@@ -248,6 +252,11 @@
icon_state = "unexplored"
area_flags = CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED
/area/icemoon/underground/unexplored/no_rivers
icon_state = "norivers"
area_flags = CAVES_ALLOWED | FLORA_ALLOWED // same rules as "shoreline" turfs since we might need this to pull double-duty
map_generator = /datum/map_generator/cave_generator/icemoon
/area/icemoon/underground/unexplored/rivers // rivers spawn here
icon_state = "danger"
map_generator = /datum/map_generator/cave_generator/icemoon
+12
View File
@@ -331,6 +331,12 @@
/turf/closed/mineral/gibtonite/volcanic = 4,
)
/// A turf that can't we can't build openspace chasms on or spawn ruins in.
/turf/closed/mineral/random/volcanic/do_not_chasm
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface/no_ruins
baseturfs = /turf/open/misc/asteroid/basalt/lava_land_surface/no_ruins
turf_flags = NO_RUINS
/turf/closed/mineral/random/snow
name = "snowy mountainside"
icon = MAP_SWITCH('icons/turf/walls/mountain_wall.dmi', 'icons/turf/mining.dmi')
@@ -365,6 +371,12 @@
/turf/closed/mineral/gibtonite/ice/icemoon = 4,
)
/// Near exact same subtype as parent, just used in ruins to prevent other ruins/chasms from spawning on top of it.
/turf/closed/mineral/random/snow/do_not_chasm
turf_type = /turf/open/misc/asteroid/snow/icemoon/do_not_chasm
baseturfs = /turf/open/misc/asteroid/snow/icemoon/do_not_chasm
turf_flags = NO_RUINS
/turf/closed/mineral/random/snow/underground
baseturfs = /turf/open/misc/asteroid/snow/icemoon
// abundant ore
+8
View File
@@ -151,6 +151,10 @@ GLOBAL_LIST_EMPTY(dug_up_basalt)
planetary_atmos = TRUE
baseturfs = /turf/open/lava/smooth/lava_land_surface
/// Used for the lavaland icemoon ruin.
/turf/open/misc/asteroid/basalt/lava_land_surface/no_ruins
turf_flags = NO_RUINS
/turf/open/misc/asteroid/lowpressure
initial_gas_mix = OPENTURF_LOW_PRESSURE
baseturfs = /turf/open/misc/asteroid/lowpressure
@@ -194,6 +198,10 @@ GLOBAL_LIST_EMPTY(dug_up_basalt)
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
slowdown = 0
/// Exact subtype as parent, just used in ruins to prevent other ruins/chasms from spawning on top of it.
/turf/open/misc/asteroid/snow/icemoon/do_not_chasm
turf_flags = NO_RUINS
/turf/open/lava/plasma/ice_moon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
baseturfs = /turf/open/lava/plasma/ice_moon
+3 -2
View File
@@ -170,9 +170,10 @@
baseturfs = /turf/open/openspace/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
planetary_atmos = TRUE
var/replacement_turf = /turf/open/misc/asteroid/snow/icemoon
/// Replaces itself with replacement_turf if the turf below this one is in a no ruins allowed area (usually ruins themselves)
/// Replaces itself with replacement_turf if the turf has the no ruins allowed flag (usually ruins themselves)
var/protect_ruin = TRUE
/// The turf that will replace this one if the turf below has the no ruins allowed flag. we use this one so we don't get any potential double whammies
var/replacement_turf = /turf/open/misc/asteroid/snow/icemoon/do_not_chasm
/// If true mineral turfs below this openspace turf will be mined automatically
var/drill_below = TRUE
Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 828 B

@@ -0,0 +1,3 @@
# renames a genturfs because the old names sucked
/turf/open/genturf/alternative : /turf/open/genturf/blue