[MIRROR] Properly unreg's turf changed when space openspace is deleted [MDB IGNORE] (#22294)

* Properly unreg's turf changed when space openspace is deleted

* merge conflict

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
This commit is contained in:
SkyratBot
2023-07-18 06:23:36 +02:00
committed by GitHub
parent 733b5b455f
commit 417d10832a
5 changed files with 25 additions and 11 deletions
+8 -11
View File
@@ -246,9 +246,6 @@
},
/turf/open/floor/mineral/titanium/yellow,
/area/shuttle/escape)
"aU" = (
/turf/open/openspace/airless,
/area/template_noop)
"aV" = (
/obj/machinery/light/directional/east,
/obj/item/radio/intercom/directional/north,
@@ -426,7 +423,7 @@ ak
aQ
ak
aj
aU
aa
aj
ak
aW
@@ -435,7 +432,7 @@ aW
ak
ak
aj
aU
aa
aj
ak
ak
@@ -460,7 +457,7 @@ aO
aE
aS
ak
aU
aa
ak
aE
aE
@@ -469,7 +466,7 @@ aE
aE
aP
ak
aU
aa
ak
aX
bc
@@ -664,7 +661,7 @@ aE
aE
aE
ak
aU
aa
ak
aV
aE
@@ -673,7 +670,7 @@ aE
aE
aE
ak
aU
aa
ak
bb
bd
@@ -698,7 +695,7 @@ ab
ab
ak
aj
aU
aa
aj
ak
ab
@@ -707,7 +704,7 @@ ab
ab
ak
aj
aU
aa
aj
ak
ak
+2
View File
@@ -23,6 +23,8 @@
// I am so sorry
/turf/open/openspace/Initialize(mapload) // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
. = ..()
if(PERFORM_ALL_TESTS(focus_only/openspace_clear) && !GET_TURF_BELOW(src))
stack_trace("[src] was inited as openspace with nothing below it at ([x], [y], [z])")
RegisterSignal(src, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON, PROC_REF(on_atom_created))
var/area/our_area = loc
if(istype(our_area, /area/space))
+9
View File
@@ -251,6 +251,8 @@
/turf/open/space/openspace/Initialize(mapload) // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
. = ..()
if(PERFORM_ALL_TESTS(focus_only/openspace_clear) && !GET_TURF_BELOW(src))
stack_trace("[src] was inited as openspace with nothing below it at ([x], [y], [z])")
icon_state = "pure_white"
// We make the assumption that the space plane will never be blacklisted, as an optimization
if(SSmapping.max_plane_offset)
@@ -261,6 +263,13 @@
. = ..()
AddElement(/datum/element/turf_z_transparency)
/turf/open/space/openspace/Destroy()
// Signals persist through destroy, GO HOME
var/turf/below = GET_TURF_BELOW(src)
if(below)
UnregisterSignal(below, COMSIG_TURF_CHANGE)
return ..()
/turf/open/space/openspace/zAirIn()
return TRUE
@@ -119,6 +119,9 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE)
ignore += subtypesof(/obj/machinery/airlock_controller)
// Always ought to have an associated escape menu. Any references it could possibly hold would need one regardless.
ignore += subtypesof(/atom/movable/screen/escape_menu)
// Can't spawn openspace above nothing, it'll get pissy at me
ignore += typesof(/turf/open/space/openspace)
ignore += typesof(/turf/open/openspace)
var/list/cached_contents = spawn_at.contents.Copy()
var/original_turf_type = spawn_at.type
@@ -36,5 +36,8 @@
/// Checks for bad icon / icon state setups in cooking crafting menu
/datum/unit_test/focus_only/bad_cooking_crafting_icons
/// Ensures openspace never spawns on the bottom of a z stack
/datum/unit_test/focus_only/openspace_clear
/// Checks to ensure that variables expected to exist in a job datum (for config reasons) actually exist
/datum/unit_test/focus_only/missing_job_datum_variables