Merge pull request #12053 from Couls/boxing-in-the-90s

Fix cardboard box walldash
This commit is contained in:
Fox McCloud
2019-08-29 20:54:07 -04:00
committed by GitHub
@@ -15,15 +15,19 @@
var/move_delay = 0
var/egged = 0
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
if(opened || move_delay || user.stat || user.stunned || user.weakened || user.paralysis || !isturf(loc) || !has_gravity(loc))
/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
if(!istype(user) || opened || move_delay || user.incapacitated() || !isturf(loc) || !has_gravity(loc))
return
move_delay = 1
if(step(src, direction))
spawn(config.walk_speed)
move_delay = 0
move_delay = TRUE
var/oldloc = loc
step(src, direction)
if(oldloc != loc)
addtimer(CALLBACK(src, .proc/ResetMoveDelay), config.walk_speed)
else
move_delay = 0
move_delay = FALSE
/obj/structure/closet/cardboard/proc/ResetMoveDelay()
move_delay = FALSE
/obj/structure/closet/cardboard/open()
if(opened || !can_open())