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:
FinancialGoose
2026-04-21 13:43:47 -07:00
committed by GitHub
parent 55366497a3
commit e98cb75c57
30 changed files with 211 additions and 218 deletions
+2 -3
View File
@@ -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