Moves assert_gas() into a define it should always have been, speeding up atmos slightly

This commit is contained in:
Jordan Brown
2017-10-07 13:37:28 -05:00
committed by CitadelStationBot
parent 5f4b3594d0
commit 4f32b7a0d4
17 changed files with 266 additions and 63 deletions
@@ -174,7 +174,7 @@
/obj/machinery/portable_atmospherics/canister/proc/create_gas()
if(gas_type)
air_contents.add_gas(gas_type)
ADD_GAS(gas_type, air_contents.gases)
if(starter_temp)
air_contents.temperature = starter_temp
air_contents.gases[gas_type][MOLES] = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
@@ -45,7 +45,7 @@
filtered.temperature = filtering.temperature
for(var/gas in filtering.gases & scrubbing)
filtered.add_gas(gas)
ADD_GAS(gas, filtered.gases)
filtered.gases[gas][MOLES] = filtering.gases[gas][MOLES] // Shuffle the "bad" gasses to the filtered mixture.
filtering.gases[gas][MOLES] = 0
filtering.garbage_collect() // Now that the gasses are set to 0, clean up the mixture.