mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
use fox's code
This commit is contained in:
@@ -15,18 +15,20 @@
|
||||
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 = TRUE
|
||||
var/oldloc = loc
|
||||
step(src, direction)
|
||||
if(oldloc != loc)
|
||||
spawn(config.walk_speed)
|
||||
move_delay = FALSE
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), config.walk_speed)
|
||||
else
|
||||
move_delay = FALSE
|
||||
|
||||
/obj/structure/closet/cardboard/proc/ResetMoveDelay()
|
||||
move_delay = FALSE
|
||||
|
||||
/obj/structure/closet/cardboard/open()
|
||||
if(opened || !can_open())
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user