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 -2
View File
@@ -30,7 +30,7 @@
SIGNAL_HANDLER
var/datum/gas_mixture/mix_to_spawn = new()
mix_to_spawn.add_gas(gas_type)
mix_to_spawn.gases[gas_type][MOLES] = amount_of_gas
mix_to_spawn.temperature = T20C
mix_to_spawn.set_gas(gas_type, amount_of_gas)
mix_to_spawn.set_temperature(T20C)
var/turf/open/our_turf = get_turf(target)
our_turf.assume_air(mix_to_spawn)