From 91f618a5a77d2412e43b648022dfdcc4d096ea9d Mon Sep 17 00:00:00 2001 From: Tytynguyen Date: Sat, 26 Mar 2016 12:33:45 -0700 Subject: [PATCH] Atmospheric readings are now accurate to 0.01% --- code/__HELPERS/unsorted.dm | 4 ++-- code/game/objects/items/devices/PDA/PDA.dm | 4 ++-- code/game/objects/items/devices/scanners.dm | 20 +++++++++++--------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index e509e5bb806..c1dd0f89a46 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -901,8 +901,8 @@ var/list/WALLITEMS_INVERSE = list( for(var/id in cached_gases) var/gas_concentration = cached_gases[id][MOLES]/total_moles - if(id in hardcoded_gases || gas_concentration > 0.01) //ensures the four primary gases are always shown. - user << "[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100)] %" + if(id in hardcoded_gases || gas_concentration > 0.001) //ensures the four primary gases are always shown. + user << "[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %" user << "Temperature: [round(air_contents.temperature-T0C)] °C" else diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index d5fd7d18964..5e07f7c3e54 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -269,8 +269,8 @@ var/global/list/obj/item/device/pda/PDAs = list() if (total_moles) for(var/id in env_gases) var/gas_level = env_gases[id][MOLES]/total_moles - if(id in hardcoded_gases || gas_level > 0.01) - dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100)]%
" + if(id in hardcoded_gases || gas_level > 0.001) + dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100, 0.01)]%
" dat += "Temperature: [round(environment.temperature-T0C)]°C
" dat += "
" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 68052b14958..7099ecfa557 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -281,28 +281,30 @@ MASS SPECTROMETER environment.garbage_collect() if(abs(n2_concentration - N2STANDARD) < 20) - user << "Nitrogen: [round(n2_concentration*100)] %" + user << "Nitrogen: [round(n2_concentration*100, 0.01)] %" else - user << "Nitrogen: [round(n2_concentration*100)] %" + user << "Nitrogen: [round(n2_concentration*100, 0.01)] %" if(abs(o2_concentration - O2STANDARD) < 2) - user << "Oxygen: [round(o2_concentration*100)] %" + user << "Oxygen: [round(o2_concentration*100, 0.01)] %" else - user << "Oxygen: [round(o2_concentration*100)] %" + user << "Oxygen: [round(o2_concentration*100, 0.01)] %" if(co2_concentration > 0.01) - user << "CO2: [round(co2_concentration*100)] %" + user << "CO2: [round(co2_concentration*100, 0.01)] %" else - user << "CO2: [round(co2_concentration*100)] %" + user << "CO2: [round(co2_concentration*100, 0.01)] %" - if(plasma_concentration > 0.01) - user << "Plasma: [round(plasma_concentration*100)] %" + if(plasma_concentration > 0.005) + user << "Plasma: [round(plasma_concentration*100, 0.01)] %" + else + user << "Plasma: [round(plasma_concentration*100, 0.01)] %" for(var/id in env_gases) if(id in hardcoded_gases) continue var/gas_concentration = env_gases[id][MOLES]/total_moles - user << "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100)] %" + user << "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %" user << "Temperature: [round(environment.temperature-T0C)] °C"