Minor refactor of how gas IDs are handled
This commit is contained in:
committed by
CitadelStationBot
parent
5b4e26cb06
commit
c0e9cde5c2
@@ -426,14 +426,14 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
var/datum/gas_mixture/GM = new
|
||||
ASSERT_GAS("plasma", GM)
|
||||
ADD_GAS(/datum/gas/plasma, GM.gases)
|
||||
if(prob(10))
|
||||
GM.gases["plasma"][MOLES] += 100
|
||||
GM.gases[/datum/gas/plasma][MOLES] += 100
|
||||
GM.temperature = 1500+T0C //should be enough to start a fire
|
||||
T.visible_message("The [src] suddenly disgorges a cloud of heated plasma.")
|
||||
qdel(src)
|
||||
else
|
||||
GM.gases["plasma"][MOLES] += 5
|
||||
GM.gases[/datum/gas/plasma][MOLES] += 5
|
||||
GM.temperature = istype(T) ? T.air.return_temperature() : T20C
|
||||
T.visible_message("The [src] suddenly disgorges a cloud of plasma.")
|
||||
T.assume_air(GM)
|
||||
|
||||
@@ -237,9 +237,9 @@
|
||||
cabin_air = new
|
||||
cabin_air.temperature = T20C
|
||||
cabin_air.volume = 200
|
||||
cabin_air.assert_gases("o2","n2")
|
||||
cabin_air.gases["o2"][MOLES] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
|
||||
cabin_air.gases["n2"][MOLES] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
|
||||
cabin_air.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
||||
cabin_air.gases[/datum/gas/oxygen][MOLES] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
|
||||
cabin_air.gases[/datum/gas/nitrogen][MOLES] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
|
||||
return cabin_air
|
||||
|
||||
/obj/mecha/proc/add_radio()
|
||||
|
||||
Reference in New Issue
Block a user