From 176642ba76858c37c598e5e3cd3d2dd7aceced71 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Mon, 9 Oct 2017 14:01:49 +0300 Subject: [PATCH] Stops airlocks from getting harddeleted, also fixes an unrelated runtime (#31412) * Stops airlocks from getting harddeleted, also fixes an unrelated runtime Destroying doors with a sniper rifle or anything that flat out destroys them good would runtime in doors.dm #L184. Also doors would very often not get qdel'd properly, it was not 100% of the time but very common, this *seems* to fix it but since reproducing the bug was never quite certain, I'm not absolutely sure I got it. I did destroy all the doors on the station without triggering a harddel on a door after this fix, where previously it would happen. * old friend ex_act --- code/game/machinery/doors/airlock.dm | 2 ++ code/game/objects/obj_defense.dm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 464ac9f764..99f174b94c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -234,6 +234,8 @@ for(var/obj/machinery/doorButtons/D in GLOB.machines) D.removeMe(src) qdel(note) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.remove_from_hud(src) return ..() /obj/machinery/door/airlock/handle_atom_del(atom/A) diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 0c70ee63c8..646548bbca 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -52,10 +52,12 @@ return ..() //contents explosion if(target == src) + obj_integrity = 0 qdel(src) return switch(severity) if(1) + obj_integrity = 0 qdel(src) if(2) take_damage(rand(100, 250), BRUTE, "bomb", 0)