From 4b70a9cf67de2474c6cc488100faed6c0277d44d Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Mon, 23 Sep 2019 03:09:15 +0200
Subject: [PATCH] Makes abandoned crates less prone to explosions.
---
code/modules/mining/abandoned_crates.dm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm
index 4a0faf69f5..f98f0755c8 100644
--- a/code/modules/mining/abandoned_crates.dm
+++ b/code/modules/mining/abandoned_crates.dm
@@ -169,6 +169,7 @@
locked = FALSE
cut_overlays()
add_overlay("securecrateg")
+ tamperproof = 0 // set explosion chance to zero, so we dont accidently hit it with a multitool and instantly die
else if (input == null || sanitycheck == null || length(input) != codelen)
to_chat(user, "You leave the crate alone.")
else
@@ -213,6 +214,12 @@
return
return ..()
+/obj/structure/closet/secure/loot/dive_into(mob/living/user)
+ if(!locked)
+ return ..()
+ to_chat(user, "That seems like a stupid idea.")
+ return FALSE
+
/obj/structure/closet/crate/secure/loot/emag_act(mob/user)
. = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT)
if(!locked)
@@ -227,4 +234,6 @@
..()
/obj/structure/closet/crate/secure/loot/deconstruct(disassembled = TRUE)
+ if(!locked && disassembled)
+ return ..()
boom()