Fixes infinite loop in closet resist code (#92355)

This commit is contained in:
LemonInTheDark
2025-07-29 00:15:54 -07:00
committed by Roxy
parent 71d1633667
commit 9bf9c875bb
2 changed files with 11 additions and 13 deletions
@@ -1038,15 +1038,13 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
return TRUE
/obj/structure/closet/container_resist_act(mob/living/user, loc_required = TRUE)
if(isstructure(loc))
relay_container_resist_act(user, loc)
if(opened)
return
if(ismovable(loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
AM.relay_container_resist_act(user, src)
var/atom/movable/movable_parent = loc
movable_parent.relay_container_resist_act(user, src)
return
if(!welded && !locked)
open()
@@ -1075,7 +1073,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(user)
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()