Gas Mixture Refactor (#13602)

* Gas Mixture Refactor

* derp

* defined turf types

* fixes

* cuts turf visuals cost in half

* even better equalizing with planetary atmos

* remove volatile fuel

* comment and documentatino on turf gas vars
This commit is contained in:
Fox McCloud
2020-06-24 17:48:50 -06:00
committed by GitHub
parent 086cd97af8
commit 69de03a622
32 changed files with 529 additions and 1353 deletions
+9 -10
View File
@@ -110,6 +110,7 @@
var/N2_pp = breath.get_breath_partial_pressure(breath.nitrogen)
var/Toxins_pp = breath.get_breath_partial_pressure(breath.toxins)
var/CO2_pp = breath.get_breath_partial_pressure(breath.carbon_dioxide)
var/SA_pp = breath.get_breath_partial_pressure(breath.sleeping_agent)
//-- OXY --//
@@ -230,16 +231,14 @@
//-- TRACES --//
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = breath.get_breath_partial_pressure(SA.moles)
if(SA_pp > SA_para_min)
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
H.emote(pick("giggle", "laugh"))
if(breath.sleeping_agent) // If there's some other shit in the air lets deal with it here.
if(SA_pp > SA_para_min)
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
H.emote(pick("giggle", "laugh"))
handle_breath_temperature(breath, H)