diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 3bc1d51f3897..3057df12ab14 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -332,6 +332,13 @@ #define GAS_FLAG_DANGEROUS (1<<0) #define GAS_FLAG_BREATH_PROC (1<<1) +// Flag for update_air_ref() +#define AIR_REF_CLOSED_TURF -1 +#define AIR_REF_SPACE_TURF 0 + +#define AIR_REF_PLANETARY_TURF (1<<0) //SIMULATION_DIFFUSE 0b1 +#define AIR_REF_OPEN_TURF (1<<1) //SIMULATION_ALL 0b10 + //HELPERS #define PIPING_LAYER_SHIFT(T, PipingLayer) \ if(T.dir & (NORTH|SOUTH)) { \ diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index d20bac3e0dd5..66ba1c3891c4 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -168,8 +168,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( /turf/open/ChangeTurf(path, list/new_baseturfs, flags) //Resist the temptation to make this default to keeping air. //don't if(!SSair.initialized) - . = ..() - return + return ..() if ((flags & CHANGETURF_INHERIT_AIR) && ispath(path, /turf/open) && air) var/datum/gas_mixture/stashed_air = new() stashed_air.copy_from(air) @@ -178,25 +177,23 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( QDEL_NULL(stashed_air) return var/turf/open/newTurf = . - var/turf_fire_ref if(turf_fire) if(isgroundlessturf(newTurf)) QDEL_NULL(turf_fire) else - turf_fire_ref = turf_fire - newTurf.turf_fire = turf_fire_ref + newTurf.turf_fire = turf_fire newTurf.air.copy_from(stashed_air) - update_air_ref(planetary_atmos ? 1 : 2) + update_air_ref(planetary_atmos ? AIR_REF_PLANETARY_TURF : AIR_REF_OPEN_TURF) QDEL_NULL(stashed_air) else if(turf_fire) QDEL_NULL(turf_fire) if(ispath(path, /turf/open)) . = ..() - if(!istype(air,/datum/gas_mixture)) + if(!istype(air, /datum/gas_mixture)) Initalize_Atmos(0) else - update_air_ref(-1) + update_air_ref(AIR_REF_CLOSED_TURF) . = ..() diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 0e4d5ae8f842..62b477ce1b06 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -160,9 +160,9 @@ /turf/open/Initalize_Atmos(times_fired) if(!blocks_air) if(!istype(air,/datum/gas_mixture/turf)) - air = new(2500,src) + air = new(2500, src) air.copy_from_turf(src) - update_air_ref(planetary_atmos ? 1 : 2) + update_air_ref(planetary_atmos ? AIR_REF_PLANETARY_TURF : AIR_REF_OPEN_TURF) update_visuals() diff --git a/code/game/turfs/open/space/space.dm b/code/game/turfs/open/space/space.dm index 5b08beb1c671..0784f2a140a7 100644 --- a/code/game/turfs/open/space/space.dm +++ b/code/game/turfs/open/space/space.dm @@ -40,7 +40,7 @@ if(!space_gas) space_gas = new air = space_gas - update_air_ref(0) + update_air_ref(AIR_REF_SPACE_TURF) vis_contents.Cut() //removes inherited overlays visibilityChanged() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index ca5a6fe3fd25..d9bc5b7f6c48 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -158,7 +158,7 @@ GLOBAL_LIST_EMPTY(created_baseturf_lists) var/turf/open/O = src __auxtools_update_turf_temp_info(isspaceturf(get_z_base_turf()) && !O.planetary_atmos) else - update_air_ref(-1) + update_air_ref(AIR_REF_CLOSED_TURF) __auxtools_update_turf_temp_info(isspaceturf(get_z_base_turf())) return INITIALIZE_HINT_NORMAL diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index a0538855ecbd..aed68827474a 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -30,8 +30,8 @@ /turf/open/Initialize(mapload, inherited_virtual_z) air = new(2500,src) air.copy_from_turf(src) - update_air_ref(planetary_atmos ? 1 : 2) - . = ..() + update_air_ref(planetary_atmos ? AIR_REF_PLANETARY_TURF : AIR_REF_OPEN_TURF) + return ..() /turf/open/Destroy() if(active_hotspot) diff --git a/dependencies.sh b/dependencies.sh index d026da97595b..ccef40acf208 100755 --- a/dependencies.sh +++ b/dependencies.sh @@ -27,4 +27,4 @@ export PYTHON_VERSION=3.7.9 export AUXMOS_REPO=https://github.com/Putnam3145/auxmos #auxmos version -export AUXMOS_VERSION=b7df056b5eb7a8d56837d92a6c224c6367198bb8 +export AUXMOS_VERSION=de6f041596573da4f058fe51fb4068acdaf01988