Files
Bubberstation/code/datums/keybinding/artificial_intelligence.dm
T
Jacquerel d8e62bc499 AI deploy to shell verb does not take an input (#94664)
## About The Pull Request

Fixes #94663 
It seems that using the "Deploy to Shell" verb as an AI will launch a
popup asking which mob in view you want to trigger the verb as, which is
obviously unintended behaviour.
I've resolved this by moving all of the behaviour to a proc which the
verb calls, so existing code which passes in a mob should still function
as it did previously.

There might be a different way to do this but I'll be honest I try not
to ever add verbs so I don't know what it is.

## Why It's Good For The Game

When you use a verb from the verb panel you implicitly expect to be the
mob using the verb, not to have to select yourself from a list first.

## Changelog

🆑
fix: AI shell deployment verb no longer requires you to select yourself
from a list first
/🆑
2025-12-31 11:53:27 -05:00

22 lines
677 B
Plaintext

/datum/keybinding/artificial_intelligence
category = CATEGORY_AI
weight = WEIGHT_AI
/datum/keybinding/artificial_intelligence/can_use(client/user)
return isAI(user.mob)
/datum/keybinding/artificial_intelligence/reconnect
hotkey_keys = list("-")
name = "reconnect"
full_name = "Reconnect to shell"
description = "Reconnects you to your most recently used AI shell"
keybind_signal = COMSIG_KB_SILICON_RECONNECT_DOWN
/datum/keybinding/artificial_intelligence/reconnect/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
var/mob/living/silicon/ai/our_ai = user.mob
our_ai.select_shell(our_ai.redeploy_action.last_used_shell)
return TRUE