From d6db93bd38d6db63c354972baf3b74644db2ee09 Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Sun, 9 Sep 2012 00:25:51 +0000 Subject: [PATCH] -Small improvement to atmos. Changed the "locate a space tile every time" to instead use a pre-located space tile. It'll stop the need to locate one everytime, but in the off-chance that the space tile isn't there anymore, it'll locate a new one. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4662 316c924e-a436-60f5-8080-3fe189b3f50e --- code/FEA/FEA_turf_tile.dm | 10 ++++++---- code/setup.dm | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/FEA/FEA_turf_tile.dm b/code/FEA/FEA_turf_tile.dm index f048c89096..9af7bd58ec 100644 --- a/code/FEA/FEA_turf_tile.dm +++ b/code/FEA/FEA_turf_tile.dm @@ -499,10 +499,12 @@ turf mimic_temperature_solid(neighbor, neighbor.thermal_conductivity) //Radiate excess tile heat to space - var/turf/space/sample_space = locate(/turf/space) - if(sample_space && (temperature > T0C)) - //Considering 0 degC as te break even point for radiation in and out - mimic_temperature_solid(sample_space, FLOOR_HEAT_TRANSFER_COEFFICIENT) + if(temperature > T0C) + // Is there a pre-defined Space Tile? + if(!Space_Tile) + Space_Tile = locate(/turf/space) // Define one + //Considering 0 degC as te break even point for radiation in and out + mimic_temperature_solid(Space_Tile, FLOOR_HEAT_TRANSFER_COEFFICIENT) //Conduct with air on my tile if I have it if(air) diff --git a/code/setup.dm b/code/setup.dm index 0317a54a73..e77c20295f 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -105,6 +105,8 @@ #define T20C 293.15 // 20degC #define TCMB 2.7 // -270.3degC +var/turf/space/Space_Tile = locate(/turf/space) // A space tile to reference when atmos wants to remove excess heat. + #define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) // Tank starts leaking #define TANK_RUPTURE_PRESSURE (40.*ONE_ATMOSPHERE) // Tank spills all contents into atmosphere