Merge pull request #31655 from duncathan/atmos-patch1

Slight change to the behavior of Assimilate_Air()
This commit is contained in:
oranges
2017-10-14 17:49:18 +13:00
committed by CitadelStationBot
parent 2d2adfbee5
commit dd8fb2a5ad

View File

@@ -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