diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index d707aae41f6..191294a6085 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -45,6 +45,9 @@ if(input == code) if(!spawned_loot) spawn_loot() + if(qdel_on_open) + qdel(src) + return tamperproof = 0 // set explosion chance to zero, so we dont accidently hit it with a multitool and instantly die togglelock(user) else if(!input || !sanitycheck || length(sanitised) != codelen) @@ -55,8 +58,9 @@ attempts-- if(attempts == 0) boom(user) - else - return ..() + return + + return ..() /obj/structure/closet/crate/secure/loot/AltClick(mob/living/user) if(!user.canUseTopic(src, BE_CLOSE)) @@ -106,18 +110,14 @@ /obj/structure/closet/crate/secure/loot/togglelock(mob/user, silent = FALSE) if(!locked) - . = ..() - if(locked) + . = ..() //Run the normal code. + if(locked) //Double check if the crate actually locked itself when the normal code ran. //reset the anti-tampering, number of attempts and last attempt when the lock is re-enabled. tamperproof = initial(tamperproof) attempts = initial(attempts) lastattempt = null return if(tamperproof) - boom(user) - return - if (qdel_on_open) - qdel(src) return return ..()