Fixing some issues where the atmos sensor was too sensitive. Only change is with CO2 at this point, may or may not adjust that in the future.

Resolved what appears to be an old bug with the CO2 detection system causing alerts for CO2 at 0.05kPa and 0.1kPa when the minimum value to cause harm is 10kPa. Updated values to 5 and 10 kPa for minor/severe alerts respectively. 

Also introduced detection for "unknown gases", which basically consists of N2O.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@665 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
hunterluthi
2010-12-19 01:35:27 +00:00
parent 5d59ca4397
commit 7bfd296b70
+24 -4
View File
@@ -111,8 +111,8 @@
output += {"Carbon: "}
percent = round(environment.carbon_dioxide / total * 100, 2)
//CO2 Levels Sensor
if(environment.carbon_dioxide > 0.05)
if(environment.carbon_dioxide > 0.1)
if(environment.carbon_dioxide > 5)
if(environment.carbon_dioxide > 10)
output += {"<font color='red'><b>[percent]</b></font>%<br>"}
safe = 0
else
@@ -132,6 +132,18 @@
if(safe != 0) safe = 1
else output += {"<font color='green'>[percent]</font>%<br>"}
//Trace Gas Sensor
if(safe && environment.trace_gases.len)
for(var/datum/gas/sleeping_agent/SA in environment.trace_gases)
var/SA_pp = (SA.moles/environment.total_moles())*environment_pressure
if(SA_pp > 0.01)
if(SA_pp > 1)
output += {"<font color='red'>High Concentration of Unknown Particles Detected</font><br>"}
safe = 0
else
output += {"<font color='orange'>Low Concentration of Unknown Particles Detected</font><br>"}
safe = 1
output += {"Temperature: "}
//Temperature Levels Sensor
if((environment.temperature < (T20C-10)) || (environment.temperature > (T20C+10)))
@@ -338,9 +350,9 @@
safe = 0
else safe = 1
if(safe && (environment.carbon_dioxide > 0.05))
if(safe && (environment.carbon_dioxide > 5))
//CO2 Levels Sensor
if(environment.carbon_dioxide > 0.1)
if(environment.carbon_dioxide > 10)
safe = 0
else safe = 1
@@ -350,6 +362,14 @@
safe = 0
else safe = 1
if(safe && environment.trace_gases.len)
for(var/datum/gas/sleeping_agent/SA in environment.trace_gases)
var/SA_pp = (SA.moles/environment.total_moles())*environment_pressure
if(SA_pp > 0.01)
if(SA_pp > 1)
safe = 0
else safe = 1
src.icon_state = "alarm[!safe]"
if(safe == 2) src.skipprocess = 1