diff --git a/code/__DEFINES/atmospherics/atmos_helpers.dm b/code/__DEFINES/atmospherics/atmos_helpers.dm index 88702147646..4610499ab9c 100644 --- a/code/__DEFINES/atmospherics/atmos_helpers.dm +++ b/code/__DEFINES/atmospherics/atmos_helpers.dm @@ -70,3 +70,8 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0)) #define TURFS_CAN_SHARE(T1, T2) (LAZYACCESS(T2.atmos_adjacent_turfs, T1) || LAZYLEN(T1.atmos_adjacent_turfs & T2.atmos_adjacent_turfs)) //Use this to see if a turf is fully blocked or not, think windows or firelocks. Fails with 1x1 non full tile windows, but it's not worth the cost. #define TURF_SHARES(T) (LAZYLEN(T.atmos_adjacent_turfs)) + +#define LINDA_CYCLE_ARCHIVE(turf)\ + turf.air.archive();\ + turf.archived_cycle = SSair.times_fired;\ + turf.temperature_archived = turf.temperature; diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index 81afa57c179..b09a4bba60b 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -145,9 +145,7 @@ temperature_archived = temperature /turf/open/archive() - air.archive() - archived_cycle = SSair.times_fired - temperature_archived = temperature + LINDA_CYCLE_ARCHIVE(src) /////////////////////////GAS OVERLAYS////////////////////////////// @@ -242,7 +240,7 @@ /turf/open/process_cell(fire_count) if(archived_cycle < fire_count) //archive self if not already done - archive() + LINDA_CYCLE_ARCHIVE(src) current_cycle = fire_count var/cached_ticker = significant_share_ticker @@ -259,12 +257,10 @@ max_share = 0 //Gotta reset our tracker #endif - for(var/t in adjacent_turfs) - var/turf/open/enemy_tile = t - + for(var/turf/open/enemy_tile as anything in adjacent_turfs) if(fire_count <= enemy_tile.current_cycle) continue - enemy_tile.archive() + LINDA_CYCLE_ARCHIVE(enemy_tile) /******************* GROUP HANDLING START *****************************************************************/ @@ -311,7 +307,7 @@ if (planetary_atmos) //share our air with the "atmosphere" "above" the turf var/datum/gas_mixture/planetary_mix = SSair.planetary[initial_gas_mix] // archive ourself again so we don't accidentally share more gas than we currently have - archive() + LINDA_CYCLE_ARCHIVE(src) if(our_air.compare(planetary_mix)) if(!our_excited_group) var/datum/excited_group/new_group = new