From df2e8b14320402906fce990b5b3f70bbfb53f1c4 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Mon, 21 Feb 2011 20:53:29 +0000 Subject: [PATCH] Fixed a pretty serious issue with containment fields. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1083 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/power/singularity/containment_field.dm | 4 ++-- code/modules/power/singularity/field_generator.dm | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index c87a071c3fe..ea1945ebcf8 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -17,9 +17,9 @@ Del() - if(FG1) + if(FG1 && !FG1.clean_up) FG1.cleanup() - if(FG2) + if(FG2 && !FG2.clean_up) FG2.cleanup() ..() diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 313470834a1..3fc896c751b 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -19,6 +19,7 @@ powerlevel = 0 list/obj/machinery/containment_field/fields list/obj/machinery/field_generator/connected_gens + clean_up = 0 update_icon() @@ -310,6 +311,7 @@ cleanup() + clean_up = 1 for (var/obj/machinery/containment_field/F in fields) if (isnull(F)) continue @@ -321,3 +323,4 @@ FG.connected_gens.Remove(src) connected_gens.Remove(FG) connected_gens = list() + clean_up = 0