mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +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:
@@ -14,9 +14,8 @@
|
||||
|
||||
/obj/structure/transit_tube_pod/Initialize(mapload)
|
||||
. = ..()
|
||||
air_contents.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD
|
||||
air_contents.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD
|
||||
var/list/new_gases = list(/datum/gas/oxygen = MOLES_O2STANDARD, /datum/gas/nitrogen = MOLES_N2STANDARD)
|
||||
air_contents.adjust_multiple_gases(new_gases)
|
||||
air_contents.temperature = T20C
|
||||
|
||||
/obj/structure/transit_tube_pod/Destroy()
|
||||
|
||||
Reference in New Issue
Block a user