mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Refactor gasmix mole change into a proc (#95327)
## About The Pull Request Refactor the majority of the current gasmix mole change use cases into a proc called adjust_gas which simply adds the designated mole count of the species into the gas mix while also handling asserting the gas and garbage_collect() I also added adjust_multiple_gases and convert_gas() for modifying multiple gases and within a gasmix ## Why It's Good For The Game Lemon wanted this to be done as part of the air group refactor ## Changelog 🆑 refactor: refactored majority of gas_mix mole change into adjust_gas() proc /🆑
This commit is contained in:
@@ -418,9 +418,8 @@
|
||||
|
||||
/obj/structure/chrono_field/return_air() //we always have nominal air and temperature
|
||||
var/datum/gas_mixture/fresh_air = new
|
||||
fresh_air.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
||||
fresh_air.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD
|
||||
fresh_air.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD
|
||||
fresh_air.set_gas(/datum/gas/oxygen, MOLES_O2STANDARD)
|
||||
fresh_air.set_gas(/datum/gas/nitrogen, MOLES_N2STANDARD)
|
||||
fresh_air.temperature = T20C
|
||||
return fresh_air
|
||||
|
||||
|
||||
Reference in New Issue
Block a user