mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-16 10:27:34 +01:00
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
/mob/living/Moved()
|
|
. = ..()
|
|
update_turf_movespeed(loc)
|
|
//Hide typing indicator if we move.
|
|
clear_typing_indicator()
|
|
if(is_shifted)
|
|
is_shifted = FALSE
|
|
pixel_x = get_standard_pixel_x_offset(lying)
|
|
pixel_y = get_standard_pixel_y_offset(lying)
|
|
|
|
/mob/living/toggle_move_intent()
|
|
. = ..()
|
|
update_move_intent_slowdown()
|
|
|
|
/mob/living/update_config_movespeed()
|
|
update_move_intent_slowdown()
|
|
return ..()
|
|
|
|
/mob/living/proc/update_move_intent_slowdown()
|
|
var/mod = 0
|
|
if(m_intent == MOVE_INTENT_WALK)
|
|
mod = CONFIG_GET(number/movedelay/walk_delay)
|
|
else
|
|
mod = CONFIG_GET(number/movedelay/run_delay)
|
|
if(!isnum(mod))
|
|
mod = 1
|
|
add_movespeed_modifier(MOVESPEED_ID_MOB_WALK_RUN_CONFIG_SPEED, TRUE, 100, override = TRUE, multiplicative_slowdown = mod)
|
|
|
|
/mob/living/proc/update_turf_movespeed(turf/open/T)
|
|
if(isopenturf(T) && !is_flying())
|
|
add_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = T.slowdown)
|
|
else
|
|
remove_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD)
|
|
|
|
/mob/living/proc/update_pull_movespeed()
|
|
if(pulling && isliving(pulling))
|
|
var/mob/living/L = pulling
|
|
if(drag_slowdown && L.lying && !L.buckled && grab_state < GRAB_AGGRESSIVE)
|
|
add_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING, multiplicative_slowdown = PULL_PRONE_SLOWDOWN)
|
|
return
|
|
remove_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING)
|
|
|
|
/mob/living/canZMove(dir, turf/target)
|
|
return can_zTravel(target, dir) && (movement_type & FLYING)
|