diff --git a/code/datums/keybinding/artificial_intelligence.dm b/code/datums/keybinding/artificial_intelligence.dm index 8bf01889afc..8ca4fd3af7d 100644 --- a/code/datums/keybinding/artificial_intelligence.dm +++ b/code/datums/keybinding/artificial_intelligence.dm @@ -17,5 +17,5 @@ if(.) return var/mob/living/silicon/ai/our_ai = user.mob - our_ai.deploy_to_shell(our_ai.redeploy_action.last_used_shell) + our_ai.select_shell(our_ai.redeploy_action.last_used_shell) return TRUE diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 67aa473c47e..66353b576b1 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -957,10 +957,14 @@ playsound(get_turf(src), 'sound/machines/ding.ogg', 50, TRUE, ignore_walls = FALSE) to_chat(src, "Hack complete. [apc] is now under your exclusive control.") -/mob/living/silicon/ai/verb/deploy_to_shell(mob/living/silicon/robot/target) +/mob/living/silicon/ai/verb/deploy_to_shell() set category = "AI Commands" + set desc = "Transfer to an available remote body." set name = "Deploy to Shell" + select_shell() + +/mob/living/silicon/ai/proc/select_shell(mob/living/silicon/robot/target) if(incapacitated) return if(control_disabled) @@ -976,6 +980,7 @@ if(!LAZYLEN(possible)) to_chat(src, "No usable AI shell beacons detected.") + return if(!target || !(target in possible)) //If the AI is looking for a new shell, or its pre-selected shell is no longer valid target = tgui_input_list(src, "Which body to control?", "Direct Control", sort_names(possible)) @@ -1003,7 +1008,7 @@ var/mob/living/silicon/ai/AI = owner if(!AI) return - AI.deploy_to_shell() + AI.select_shell() /datum/action/innate/deploy_last_shell name = "Reconnect to shell" @@ -1017,7 +1022,7 @@ return if(last_used_shell) var/mob/living/silicon/ai/AI = owner - AI.deploy_to_shell(last_used_shell) + AI.select_shell(last_used_shell) else Remove(owner) //If the last shell is blown, destroy it. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3d725c96dc8..553fb93d8a8 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -955,7 +955,7 @@ /mob/living/silicon/robot/attack_ai(mob/user) if(shell && (!connected_ai || connected_ai == user)) var/mob/living/silicon/ai/AI = user - AI.deploy_to_shell(src) + AI.select_shell(src) /mob/living/silicon/robot/mouse_buckle_handling(mob/living/M, mob/living/user) //Don't try buckling on INTENT_HARM so that silicons can search people's inventories without loading them