From e3e396d8be4bd1823ff18a67cdf674df8a1d4391 Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Sat, 28 Dec 2024 05:16:51 +0530 Subject: [PATCH] Gets rid of spamming during closet breakout (#88682) ## About The Pull Request - Fixes #88657 When you begin resisting you can't resist again till either the breakout was successful or failed. This also lead to the shake animation being reapplied multiple times causing additional shaking on top of it already shaking ## Changelog :cl: fix: breaking out of a closet won't spam chat or shake like it's having a seizure /:cl: --- code/game/objects/structures/crates_lockers/closets.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index ea9492d1380..30a2c4e9efd 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -1034,6 +1034,8 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) open() return + if(DOING_INTERACTION_WITH_TARGET(user, src)) + return //okay, so the closet is either welded or locked... resist!!! user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT @@ -1055,7 +1057,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) to_chat(user, span_warning("You fail to break out of [src]!")) /obj/structure/closet/relay_container_resist_act(mob/living/user, obj/container) - container.container_resist_act() + container.container_resist_act(user) /// Check if someone is still resisting inside, and choose to either keep shaking or stop shaking the closet /obj/structure/closet/proc/check_if_shake()