mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Makes editing movements delay configs have an effect again (#32530)
This commit is contained in:
committed by
CitadelStationBot
parent
cde4d39989
commit
248d63fa3a
@@ -163,9 +163,20 @@ CONFIG_DEF(flag/ooc_during_round)
|
||||
CONFIG_DEF(flag/emojis)
|
||||
|
||||
CONFIG_DEF(number/run_delay) //Used for modifying movement speed for mobs.
|
||||
var/static/value_cache = 0
|
||||
|
||||
CONFIG_TWEAK(number/run_delay/ValidateAndSet())
|
||||
. = ..()
|
||||
if(.)
|
||||
value_cache = value
|
||||
|
||||
CONFIG_DEF(number/walk_delay)
|
||||
var/static/value_cache = 0
|
||||
|
||||
CONFIG_TWEAK(number/walk_delay/ValidateAndSet())
|
||||
. = ..()
|
||||
if(.)
|
||||
value_cache = value
|
||||
|
||||
CONFIG_DEF(number/human_delay) //Mob specific modifiers. NOTE: These will affect different mob types in different ways
|
||||
CONFIG_DEF(number/robot_delay)
|
||||
|
||||
@@ -15,18 +15,20 @@
|
||||
delivery_icon = "deliverybox"
|
||||
anchorable = FALSE
|
||||
var/move_speed_multiplier = 1
|
||||
var/move_delay = 0
|
||||
var/move_delay = FALSE
|
||||
var/egged = 0
|
||||
|
||||
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
|
||||
if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
|
||||
return
|
||||
move_delay = 1
|
||||
move_delay = TRUE
|
||||
if(step(src, direction))
|
||||
spawn(CONFIG_GET(number/walk_delay) * move_speed_multiplier)
|
||||
move_delay = 0
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), CONFIG_GET(number/walk_delay) * move_speed_multiplier)
|
||||
else
|
||||
move_delay = 0
|
||||
ResetMoveDelay()
|
||||
|
||||
/obj/structure/closet/cardboard/proc/ResetMoveDelay()
|
||||
move_delay = FALSE
|
||||
|
||||
/obj/structure/closet/cardboard/open()
|
||||
if(opened || !can_open())
|
||||
|
||||
@@ -479,21 +479,21 @@
|
||||
if(isopenturf(loc) && !is_flying())
|
||||
var/turf/open/T = loc
|
||||
. += T.slowdown
|
||||
var/static/config_run_delay
|
||||
var/static/config_walk_delay
|
||||
var/static/datum/config_entry/number/run_delay/config_run_delay
|
||||
var/static/datum/config_entry/number/walk_delay/config_walk_delay
|
||||
if(isnull(config_run_delay))
|
||||
config_run_delay = CONFIG_GET(number/run_delay)
|
||||
config_walk_delay = CONFIG_GET(number/walk_delay)
|
||||
if(ignorewalk)
|
||||
. += config_run_delay
|
||||
. += config_run_delay.value_cache
|
||||
else
|
||||
switch(m_intent)
|
||||
if(MOVE_INTENT_RUN)
|
||||
if(drowsyness > 0)
|
||||
. += 6
|
||||
. += config_run_delay
|
||||
. += config_run_delay.value_cache
|
||||
if(MOVE_INTENT_WALK)
|
||||
. += config_walk_delay
|
||||
. += config_walk_delay.value_cache
|
||||
|
||||
/mob/living/proc/makeTrail(turf/target_turf, turf/start, direction)
|
||||
if(!has_gravity())
|
||||
|
||||
Reference in New Issue
Block a user