mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
[MIRROR] Fix incorrect return for closet attack_hand_secondary causing lockers to have their locks toggled twice. (#6536)
* Fix incorrect return for closet attack_hand_secondary causing lockers to have their locks toggled twice. (#59814) /obj/structure/closet/attack_hand_secondary(mob/user, modifiers) doesn't return one of the expected attack chain cancelling/continuing defines and instead returns TRUE. This means that right clicking them acts as a secondary attack followed by a primary attack. When the secondary attack against a secure closet actually attempts to toggle the lock, it now cancels the entire attack chain. * Fix incorrect return for closet attack_hand_secondary causing lockers to have their locks toggled twice. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -469,9 +469,10 @@
|
||||
/obj/structure/closet/RightClick(mob/user, modifiers)
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(loc))
|
||||
return
|
||||
|
||||
if(!opened && secure)
|
||||
togglelock(user)
|
||||
return TRUE
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/obj/structure/closet/proc/togglelock(mob/living/user, silent)
|
||||
if(secure && !broken)
|
||||
|
||||
Reference in New Issue
Block a user