From dd8fb2a5adc45de71db29bb5fa72558e8039ee74 Mon Sep 17 00:00:00 2001 From: oranges Date: Sat, 14 Oct 2017 17:49:18 +1300 Subject: [PATCH] Merge pull request #31655 from duncathan/atmos-patch1 Slight change to the behavior of Assimilate_Air() --- code/game/turfs/turf.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 1ec0ea8dcb..33d474c7dd 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -279,12 +279,12 @@ //////Assimilate Air////// /turf/open/proc/Assimilate_Air() - if(blocks_air) + var/turf_count = LAZYLEN(atmos_adjacent_turfs) + if(blocks_air || !turf_count) //if there weren't any open turfs, no need to update. return var/datum/gas_mixture/total = new//Holders to assimilate air from nearby turfs var/list/total_gases = total.gases - var/turf_count = LAZYLEN(atmos_adjacent_turfs) for(var/T in atmos_adjacent_turfs) var/turf/open/S = T @@ -298,9 +298,6 @@ air.copy_from(total) - if(!turf_count) //if there weren't any open turfs, no need to update. - return - var/list/air_gases = air.gases for(var/id in air_gases) air_gases[id][MOLES] /= turf_count //Averages contents of the turfs, ignoring walls and the like