mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user