[MIRROR] Fixes plasmamen burning to death in cloning pods (#382)

* Fixes plasmamen burning to death in cloning pods

* fix travis
This commit is contained in:
CitadelStationBot
2017-04-15 13:36:59 -05:00
committed by TalkingCactus
parent 07303ebcc6
commit 09572935ca
7 changed files with 80 additions and 59 deletions
@@ -0,0 +1,14 @@
diff a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm (rejected hunks)
@@ -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,28 @@
diff a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm (rejected hunks)
@@ -12,6 +12,9 @@
..()
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
@@ -63,3 +66,16 @@
/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
@@ -1,58 +0,0 @@
//"immutable" gas mixture used for space calculations
//it can be changed, but any changes will ultimately be undone before they can have any effect
/datum/gas_mixture/space
/datum/gas_mixture/space/New()
..()
temperature = TCMB
temperature_archived = TCMB
/datum/gas_mixture/space/garbage_collect()
gases.Cut() //clever way of ensuring we always are empty.
/datum/gas_mixture/space/archive()
return 1 //nothing changes, so we do nothing and the archive is successful
/datum/gas_mixture/space/merge()
return 0 //we're immutable.
/datum/gas_mixture/space/heat_capacity()
. = 7000
/datum/gas_mixture/space/heat_capacity_archived()
. = heat_capacity()
/datum/gas_mixture/space/remove()
return copy() //we're immutable, so we can just return a copy.
/datum/gas_mixture/space/remove_ratio()
return copy() //we're immutable, so we can just return a copy.
/datum/gas_mixture/space/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
. = ..(sharer, 0)
temperature = TCMB
gases.Cut()
/datum/gas_mixture/space/after_share()
temperature = TCMB
gases.Cut()
/datum/gas_mixture/space/react()
return 0 //we're immutable.
/datum/gas_mixture/space/copy()
return new /datum/gas_mixture/space //we're immutable, so we can just return a new instance.
/datum/gas_mixture/space/copy_from()
return 0 //we're immutable.
/datum/gas_mixture/space/copy_from_turf()
return 0 //we're immutable.
/datum/gas_mixture/space/parse_gas_string()
return 0 //we're immutable.
/datum/gas_mixture/space/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
. = ..()
temperature = TCMB