diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 0adbcfecc68..28df192dde4 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -285,13 +285,14 @@ Pipelines + Other Objects -> Pipe network return for(DEVICE_TYPE_LOOP) - var/obj/machinery/atmospherics/node = NODE_I - var/turf/node_turf = get_turf(node) - var/turf/self_turf = get_turf(src) - if(node_turf.loc != self_turf.loc) //shuttles are area based, so this means the node is not on the shuttle with us - node.disconnect(src) - NODE_I = null - nullifyPipenet(PARENT_I) - + dealWithShuttleStuff(I) atmosinit() //we've moved, so what once was next to us may not be build_network() + +/obj/machinery/atmospherics/proc/dealWithShuttleStuff(I) + var/obj/machinery/atmospherics/node = NODE_I + var/turf/node_turf = get_turf(node) + var/turf/self_turf = get_turf(src) + if(node_turf.loc != self_turf.loc) //shuttles are area based, so this means the node is not on the shuttle with us + node.disconnect(src) + NODE_I = null