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 -11
View File
@@ -122,7 +122,7 @@
var/O2_partialpressure = (breath.oxygen/breath.total_moles())*breath_pressure
var/Toxins_partialpressure = (breath.toxins/breath.total_moles())*breath_pressure
var/CO2_partialpressure = (breath.carbon_dioxide/breath.total_moles())*breath_pressure
var/SA_partialpressure = (breath.sleeping_agent/breath.total_moles())*breath_pressure
//OXYGEN
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
@@ -168,16 +168,14 @@
clear_alert("too_much_tox")
//TRACE GASES
if(breath.trace_gases.len)
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_partialpressure = (SA.moles/breath.total_moles())*breath_pressure
if(SA_partialpressure > SA_para_min)
Paralyse(3)
if(SA_partialpressure > SA_sleep_min)
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
else if(SA_partialpressure > 0.01)
if(prob(20))
emote(pick("giggle","laugh"))
if(breath.sleeping_agent)
if(SA_partialpressure > SA_para_min)
Paralyse(3)
if(SA_partialpressure > SA_sleep_min)
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
else if(SA_partialpressure > 0.01)
if(prob(20))
emote(pick("giggle","laugh"))
//BREATH TEMPERATURE
handle_breath_temperature(breath)
+2 -2
View File
@@ -65,8 +65,8 @@
t+= "<span class='notice'>Oxygen: [environment.oxygen] \n</span>"
t+= "<span class='notice'>Plasma : [environment.toxins] \n</span>"
t+= "<span class='notice'>Carbon Dioxide: [environment.carbon_dioxide] \n</span>"
for(var/datum/gas/trace_gas in environment.trace_gases)
to_chat(usr, "<span class='notice'>[trace_gas.type]: [trace_gas.moles] \n</span>")
t+= "<span class='notice'>N2O: [environment.sleeping_agent] \n</span>"
t+= "<span class='notice'>Agent B: [environment.agent_b] \n</span>"
usr.show_message(t, 1)