Pipe network datum Destroy() cleanup

* Every pipe in a pipeline has a reference to the pipeline.  This needs to be cleared, both so the pipeline can be gc'd, and also so the pipes don't try and keep using the qdel'd pipeline.
* Same story for each pipeline in a pipe network, and each machine in a pipe network.
* Pipe networks are also in the pipe_networks global list.  While the controller would detect and remove it from the list on the next tick, cleaning up ourselves is the responsible thing to do.
This commit is contained in:
Leshana
2017-06-05 21:51:00 -04:00
parent 8752999a14
commit 010cca1d44
2 changed files with 11 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ datum/pipeline
if(air && air.volume)
temporarily_store_air()
for(var/obj/machinery/atmospherics/pipe/P in members)
P.parent = null
. = ..()