mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Moving while buckled or while in a locker that is locked / welded will no longer reset resist timer. (#26523)
* Moving while buckled to a surface will no longer reset the timer / cause you to fail. * Properly applies the same principal to closets and secure lockers. * Changes break out time to use the MINUTES define. * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> --------- Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -340,7 +340,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/container_resist(mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
var/breakout_time = 2 MINUTES
|
||||
if(opened)
|
||||
if(L.loc == src)
|
||||
L.forceMove(get_turf(src)) // Let's just be safe here
|
||||
@@ -358,7 +358,7 @@
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(L,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(do_after(L, breakout_time, target = src, allow_moving = TRUE, allow_moving_target = TRUE))
|
||||
if(!src || !L || L.stat != CONSCIOUS || L.loc != src || opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
add_overlay("unlocked")
|
||||
|
||||
/obj/structure/closet/secure_closet/container_resist(mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
var/breakout_time = 2 MINUTES
|
||||
if(opened)
|
||||
if(L.loc == src)
|
||||
L.forceMove(get_turf(src)) // Let's just be safe here
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(do_after(usr, breakout_time, target = src, allow_moving = TRUE, allow_moving_target = TRUE))
|
||||
if(!src || !L || L.stat != CONSCIOUS || L.loc != src || opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user