mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Fixes infinite loop in closet resist code (#92355)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user