From 4e61b999faa69589aa02007da6fb0b3bc45181ab Mon Sep 17 00:00:00 2001 From: duncathan Date: Tue, 19 Jan 2016 00:52:06 -0600 Subject: [PATCH] resolves atmos runtimes --- code/ATMOSPHERICS/components/components_base.dm | 3 +++ code/ATMOSPHERICS/pipes/heat_exchange/he_pipes.dm | 5 +++-- code/__HELPERS/unsorted.dm | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/ATMOSPHERICS/components/components_base.dm b/code/ATMOSPHERICS/components/components_base.dm index bf7371f72cd..d5eb9c70b8f 100644 --- a/code/ATMOSPHERICS/components/components_base.dm +++ b/code/ATMOSPHERICS/components/components_base.dm @@ -150,6 +150,9 @@ Helpers /obj/machinery/atmospherics/components/proc/update_parents() for(DEVICE_TYPE_LOOP) var/datum/pipeline/parent = PARENT_I + if(!parent) + PROCCRASH("Component is missing a pipenet! Rebuilding...") + build_network() parent.update = 1 /obj/machinery/atmospherics/components/returnPipenets() diff --git a/code/ATMOSPHERICS/pipes/heat_exchange/he_pipes.dm b/code/ATMOSPHERICS/pipes/heat_exchange/he_pipes.dm index 8920b51e916..5c524f73a8c 100644 --- a/code/ATMOSPHERICS/pipes/heat_exchange/he_pipes.dm +++ b/code/ATMOSPHERICS/pipes/heat_exchange/he_pipes.dm @@ -51,10 +51,11 @@ /obj/machinery/atmospherics/pipe/heat_exchanging/process() - var/datum/gas_mixture/pipe_air = return_air() - if(!pipe_air) + if(!parent) return //machines subsystem fires before atmos is initialized so this prevents race condition runtimes + var/datum/gas_mixture/pipe_air = return_air() + //Heat causes pipe to glow if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //glow starts at 500K if(abs(pipe_air.temperature - icon_temperature) > 10) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index e128530958d..ad8a7394564 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1220,3 +1220,6 @@ B --><-- A for(var/atom/location = A.loc, location, location = location.loc) if(location == src) return 1 + +/proc/PROCCRASH(msg) + CRASH(msg)