From fd9ad9376cdbca027efe299f3ddb58125b235dfc Mon Sep 17 00:00:00 2001 From: "bbusse@gmail.com" Date: Sun, 25 Sep 2011 07:08:24 +0000 Subject: [PATCH] Atmo: triggered tiles have a short period of mandatory high processing to avoid switching off too early. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2269 316c924e-a436-60f5-8080-3fe189b3f50e --- code/FEA/FEA_airgroup.dm | 2 +- code/FEA/FEA_turf_tile.dm | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/code/FEA/FEA_airgroup.dm b/code/FEA/FEA_airgroup.dm index 8237ab0bd02..c31ab6f503a 100644 --- a/code/FEA/FEA_airgroup.dm +++ b/code/FEA/FEA_airgroup.dm @@ -41,8 +41,8 @@ datum var/length_space_border = 0 suspend_group_processing() - update_tiles_from_group() group_processing = 0 + update_tiles_from_group() check_delay=0 next_check=0 diff --git a/code/FEA/FEA_turf_tile.dm b/code/FEA/FEA_turf_tile.dm index 5c97a149727..24187720064 100644 --- a/code/FEA/FEA_turf_tile.dm +++ b/code/FEA/FEA_turf_tile.dm @@ -341,6 +341,11 @@ turf if(istype(enemy_tile)) if(enemy_tile.archived_cycle < archived_cycle) //archive bordering tile information if not already done enemy_tile.archive() + + //check temperature difference to possibly refresh processing + //var/temperature_delta = abs(air.temperature-enemy_tile.air.temperature) + //var/temperature_trigger = (temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) + if(enemy_tile.parent && enemy_tile.parent.group_processing) //apply tile to group sharing if(enemy_tile.parent.current_cycle < current_cycle) if(enemy_tile.parent.air.check_gas_mixture(air)) @@ -349,9 +354,18 @@ turf enemy_tile.parent.suspend_group_processing() connection_difference = air.share(enemy_tile.air) //group processing failed so interact with individual tile + else if(enemy_tile.current_cycle < current_cycle) connection_difference = air.share(enemy_tile.air) + + //I've commented out temp resetting for now. + //In low-pressure situations, the temp fluctuates too much, leading to hull breaches causing massive reupdate checks + //We can replace this with a heat capacity comparison if it proves to be necessary + //if (temperature_trigger) + // reset_delay() + // enemy_tile.reset_delay() + if(active_hotspot) possible_fire_spreads += enemy_tile else @@ -576,4 +590,8 @@ turf proc/reset_delay() //sets this turf to process quickly again next_check=0 - check_delay=0 + check_delay= -5 //negative numbers mean a mandatory quick-update period + + //if this turf has a parent air group, suspend its processing + if (parent && parent.group_processing) + parent.suspend_group_processing()