diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 12048eaeb72..b3642fc0b10 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -33,18 +33,6 @@ QDEL_NULL(manifest) return ..() -/obj/structure/closet/crate/update_overlays() - . = ..() - if(broken) - . += "securecrateemag" - return - if(locked) - . += "securecrater" - return - if(secure) - . += "securecrateg" - return - /obj/structure/closet/crate/CanAllowThrough(atom/movable/mover, border_dir) . = ..() if(!istype(mover, /obj/structure/closet)) @@ -63,6 +51,12 @@ . = new_overlays if(manifest) . += "manifest" + if(broken) + . += "securecrateemag" + else if(locked) + . += "securecrater" + else if(secure) + . += "securecrateg" /obj/structure/closet/crate/attack_hand(mob/user, list/modifiers) . = ..() diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index e97a6a79202..d707aae41f6 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -30,7 +30,7 @@ if(locked) to_chat(user, span_notice("The crate is locked with a Deca-code lock.")) var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text|null - if(user.canUseTopic(src, BE_CLOSE)) + if(user.canUseTopic(src, BE_CLOSE) && locked) var/list/sanitised = list() var/sanitycheck = TRUE var/char = "" @@ -43,7 +43,6 @@ if(sanitised[i] == sanitised[j]) sanitycheck = FALSE //if a digit is repeated, reject the input if(input == code) - to_chat(user, span_notice("The crate unlocks!")) if(!spawned_loot) spawn_loot() tamperproof = 0 // set explosion chance to zero, so we dont accidently hit it with a multitool and instantly die @@ -109,7 +108,10 @@ if(!locked) . = ..() if(locked) - tamperproof = initial(tamperproof) //reset the anti-tampering when the lock is re-enabled. + //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) diff --git a/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm b/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm index c90b4eb7545..cf8df80b34f 100644 --- a/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm +++ b/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm @@ -122,7 +122,8 @@ anchorable = FALSE anchored = TRUE locked = TRUE - breakout_time = 900 + divable = FALSE //As funny as it may be, it would make little sense how you got yourself inside it in first place. + breakout_time = 90 SECONDS open_sound = 'sound/effects/shovel_dig.ogg' close_sound = 'sound/effects/shovel_dig.ogg' cutting_tool = /obj/item/shovel @@ -162,6 +163,9 @@ else to_chat(user, span_notice("The grave has already been dug up.")) +/obj/structure/closet/crate/grave/closet_update_overlays(list/new_overlays) + return + /obj/structure/closet/crate/grave/tool_interact(obj/item/S, mob/living/carbon/user) if(!user.combat_mode) //checks to attempt to dig the grave, must be done with combat mode off only. if(!opened) diff --git a/code/modules/unit_tests/closets.dm b/code/modules/unit_tests/closets.dm index cf21716d8e6..2e3b18aa6f8 100644 --- a/code/modules/unit_tests/closets.dm +++ b/code/modules/unit_tests/closets.dm @@ -9,4 +9,5 @@ for(var/closet_type in all_closets) var/obj/structure/closet/closet = allocate(closet_type) var/contents_len = length(closet.contents) - TEST_ASSERT(contents_len <= closet.storage_capacity, "Initial Contents of [closet.type] ([contents_len]) exceed its storage capacity ([closet.storage_capacity]).") + if(contents_len > closet.storage_capacity) + Fail("Initial Contents of [closet.type] ([contents_len]) exceed its storage capacity ([closet.storage_capacity]).")