Merge pull request #15782 from Putnam3145/fix-bad-air-things

Make sure ChangeTurf updates air ref on all paths
This commit is contained in:
silicons
2022-08-20 12:24:32 -07:00
committed by GitHub
2 changed files with 10 additions and 10 deletions
+6 -5
View File
@@ -151,17 +151,18 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
return
var/turf/open/newTurf = .
newTurf.air.copy_from(stashed_air)
update_air_ref(planetary_atmos ? 1 : 2)
newTurf.update_air_ref(planetary_atmos ? 1 : 2)
QDEL_NULL(stashed_air)
else
flags |= CHANGETURF_RECALC_ADJACENT
if(ispath(path,/turf/closed))
flags |= CHANGETURF_RECALC_ADJACENT
update_air_ref(-1)
. = ..()
var/turf/open/newTurf = .
newTurf.update_air_ref(-1)
else
. = ..()
if(!istype(air,/datum/gas_mixture))
Initalize_Atmos(0)
var/turf/open/newTurf = .
newTurf.Initalize_Atmos(0)
// Take off the top layer turf and replace it with the next baseturf down
/turf/proc/ScrapeAway(amount=1, flags)
+4 -5
View File
@@ -218,11 +218,10 @@
flash_color(L, flash_color = "#C80000", flash_time = 10)
/turf/open/Initalize_Atmos(times_fired)
if(!blocks_air)
if(!istype(air,/datum/gas_mixture/turf))
air = new(2500,src)
air.copy_from_turf(src)
update_air_ref(planetary_atmos ? 1 : 2)
if(!istype(air,/datum/gas_mixture/turf))
air = new(2500,src)
air.copy_from_turf(src)
update_air_ref(planetary_atmos ? 1 : 2)
update_visuals()