diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index e0d5a6a4574..9aa0f1860e4 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -56,6 +56,16 @@ holy = TRUE levelupdate() +/turf/simulated/Destroy() + if (zone && !zone.invalid) + // Try to remove it gracefully first. + if (can_safely_remove_from_zone()) + c_copy_air() + zone.remove(src) + else // Can't remove it safely, just rebuild the entire thing. + zone.rebuild() + return ..() + /turf/simulated/proc/AddTracks(typepath,bloodDNA,comingdir,goingdir,bloodcolor=COLOR_BLOOD_HUMAN) var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src if(!tracks) diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 074cc050836..c1c0a6c1bdc 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -22,7 +22,7 @@ ASSERT(N) // This makes sure that turfs are not changed to space when one side is part of a zone - if(N == /turf/space) + if(ispath(N, /turf/space)) var/turf/below = GetBelow(src) if(istype(below) && !istype(below,/turf/space)) N = below.density ? /turf/simulated/floor/plating/airless : /turf/simulated/open diff --git a/code/modules/ZAS/Zone.dm b/code/modules/ZAS/Zone.dm index 8923bc85e56..2cfb5feea39 100644 --- a/code/modules/ZAS/Zone.dm +++ b/code/modules/ZAS/Zone.dm @@ -65,9 +65,6 @@ Class Procs: var/datum/gas_mixture/air = new - var/list/graphic_add = list() - var/list/graphic_remove = list() - var/datum/lazy_value/zone_movables/movables = new /zone/New() @@ -170,11 +167,12 @@ Class Procs: if(istype(T)) T.create_fire(vsc.fire_firelevel_multiplier) + var/list/graphic_add = list() + var/list/graphic_remove = list() + if(air.check_tile_graphic(graphic_add, graphic_remove)) for(var/turf/simulated/T in contents) T.update_graphic(graphic_add, graphic_remove) - graphic_add.len = 0 - graphic_remove.len = 0 for(var/connection_edge/E in edges) if(E.sleeping)