mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 04:02:07 +00:00
* Converts move intents to /decl/move_intent Adds /decl/move_intent/walk and /decl/move_intent/run. Switches all move intent checks to use the new IS_RUNNING and IS_WALKING macros. Renames and refactors /mob/living/proc/set_m_intent() to /mob/living/proc/set_move_intent(decl/move_intent/intent). Removes the unnecessary /mob/var/m_int and associated code. Updates all move intent setters to use set_move_intent(). * Swaps incorrect config values Swaps incorrect move delays since I got them backwards somehow, oopsies. * Adds suggested ?. operator Compactifies two if statements using the ?. operator instead.
23 lines
378 B
Plaintext
23 lines
378 B
Plaintext
/decl/move_intent
|
|
var/name
|
|
var/move_delay = 1
|
|
var/hud_icon_state
|
|
|
|
// Walking
|
|
/decl/move_intent/walk
|
|
name = "Walk"
|
|
hud_icon_state = "walking"
|
|
|
|
/decl/move_intent/walk/Initialize()
|
|
. = ..()
|
|
move_delay = config.walk_speed
|
|
|
|
// Running
|
|
/decl/move_intent/run
|
|
name = "Run"
|
|
hud_icon_state = "running"
|
|
|
|
/decl/move_intent/run/Initialize()
|
|
. = ..()
|
|
move_delay = config.run_speed
|