/tg/ 4/14 (#367)
* outside code stuff * defines, helpers, etc * everything not module * modules * compiled fixes + missing sounds
This commit is contained in:
@@ -322,10 +322,10 @@
|
||||
|
||||
for(var/t in turf_list)
|
||||
var/turf/open/T = t
|
||||
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/space))
|
||||
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/immutable/space))
|
||||
space_in_group = 1
|
||||
qdel(A)
|
||||
A = new/datum/gas_mixture/space()
|
||||
A = new/datum/gas_mixture/immutable/space()
|
||||
A.merge(T.air)
|
||||
|
||||
for(var/id in A_gases)
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//"immutable" gas mixture used for immutable calculations
|
||||
//it can be changed, but any changes will ultimately be undone before they can have any effect
|
||||
|
||||
/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()
|
||||
|
||||
/datum/gas_mixture/immutable/garbage_collect()
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/archive()
|
||||
return 1 //nothing changes, so we do nothing and the archive is successful
|
||||
|
||||
/datum/gas_mixture/immutable/merge()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/heat_capacity_archived()
|
||||
return heat_capacity()
|
||||
|
||||
/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
. = ..(sharer, 0)
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/after_share()
|
||||
temperature = initial_temperature
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/react()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/copy()
|
||||
return new type //we're immutable, so we can just return a new instance.
|
||||
|
||||
/datum/gas_mixture/immutable/copy_from()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/copy_from_turf()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/parse_gas_string()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
|
||||
. = ..()
|
||||
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
|
||||
|
||||
/datum/gas_mixture/immutable/space/remove()
|
||||
return copy() //we're always empty, so we can just return a copy.
|
||||
|
||||
/datum/gas_mixture/immutable/space/remove_ratio()
|
||||
return copy() //we're always empty, so we can just return a copy.
|
||||
|
||||
|
||||
//used by cloners
|
||||
/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/heat_capacity()
|
||||
return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
|
||||
Reference in New Issue
Block a user