From aaa7468220886a32c8fa19bf4df76d7240d799e1 Mon Sep 17 00:00:00 2001
From: Frenjo <2939692+Frenjo@users.noreply.github.com>
Date: Wed, 8 Mar 2023 06:03:15 +0000
Subject: [PATCH] Fixes drake move intent switching
Updates a check so that non-carbon mobs actually have move intents that function.
---
code/_onclick/hud/screen_objects.dm | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 3980f889c0..5591b23a43 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -274,15 +274,16 @@
L.resist()
if("mov_intent")
- if(iscarbon(usr))
- var/mob/living/carbon/C = usr
- if(C.legcuffed)
- to_chat(C, "You are legcuffed! You cannot run until you get [C.legcuffed] removed!")
- C.set_move_intent(/decl/move_intent/walk) // Just incase.
- return 1
- else
- var/next_move_intent = next_in_list(C.move_intent.type, C.move_intents)
- C.set_move_intent(next_move_intent)
+ if(isliving(usr))
+ var/mob/living/L = usr
+ if(iscarbon(usr))
+ var/mob/living/carbon/C = L
+ if(C.legcuffed)
+ to_chat(C, "You are legcuffed! You cannot run until you get [C.legcuffed] removed!")
+ C.set_move_intent(/decl/move_intent/walk) // Just incase.
+ return 1
+ var/next_move_intent = next_in_list(L.move_intent.type, L.move_intents)
+ L.set_move_intent(next_move_intent)
if("Reset Machine")
usr.unset_machine()