hotfix for immutable mixtures (#368)
This commit is contained in:
committed by
TalkingCactus
parent
fd4b10e8b6
commit
773ff04310
@@ -4,16 +4,14 @@
|
||||
/datum/gas_mixture/immutable
|
||||
var/initial_temperature
|
||||
|
||||
/datum/gas_mixture/immutable/proc/reset_gas_mix()
|
||||
temperature = initial_temperature
|
||||
temperature_archived = initial_temperature
|
||||
|
||||
/datum/gas_mixture/immutable/New()
|
||||
..()
|
||||
reset_gas_mix()
|
||||
garbage_collect()
|
||||
|
||||
/datum/gas_mixture/immutable/garbage_collect()
|
||||
reset_gas_mix()
|
||||
temperature = initial_temperature
|
||||
temperature_archived = initial_temperature
|
||||
gases.Cut()
|
||||
|
||||
/datum/gas_mixture/immutable/archive()
|
||||
return 1 //nothing changes, so we do nothing and the archive is successful
|
||||
@@ -26,11 +24,10 @@
|
||||
|
||||
/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
. = ..(sharer, 0)
|
||||
reset_gas_mix()
|
||||
garbage_collect()
|
||||
|
||||
/datum/gas_mixture/immutable/after_share()
|
||||
temperature = initial_temperature
|
||||
reset_gas_mix()
|
||||
garbage_collect()
|
||||
|
||||
/datum/gas_mixture/immutable/react()
|
||||
return 0 //we're immutable.
|
||||
@@ -51,13 +48,11 @@
|
||||
. = ..()
|
||||
temperature = initial_temperature
|
||||
|
||||
|
||||
//used by space tiles
|
||||
/datum/gas_mixture/immutable/space
|
||||
initial_temperature = TCMB
|
||||
|
||||
/datum/gas_mixture/immutable/space/garbage_collect()
|
||||
gases.Cut() //clever way of ensuring we always are empty.
|
||||
|
||||
/datum/gas_mixture/immutable/space/heat_capacity()
|
||||
return 7000
|
||||
|
||||
@@ -72,10 +67,10 @@
|
||||
/datum/gas_mixture/immutable/cloner
|
||||
initial_temperature = T20C
|
||||
|
||||
/datum/gas_mixture/immutable/cloner/reset_gas_mix()
|
||||
assert_gas("n2")
|
||||
gases["n2"][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
|
||||
/datum/gas_mixture/immutable/cloner/garbage_collect()
|
||||
..()
|
||||
add_gas("n2")
|
||||
gases["n2"][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
|
||||
|
||||
/datum/gas_mixture/immutable/cloner/heat_capacity()
|
||||
return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
|
||||
|
||||
Reference in New Issue
Block a user