mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 02:01:22 +00:00
## About The Pull Request Semi WIP cus I need to probably make an issue report for lummox, but apart from that ready for review Uses the new mouse-pos so we can combine it with screen size and size to estimate very accurately the mouse position in turf terms. In future also will need to add a way to continously poll the users mouse pos but this alone is very useful ## Why It's Good For The Game This isnt used yet, but the benefits are pretty damn obvious (hitting E and dashing towards where your mouse??? 1990s features?????) ## Changelog 🆑 refactor: Added the possibility for keybindings to report the turf they clicked on. /🆑 --------- Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
22 lines
656 B
Plaintext
22 lines
656 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)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
var/mob/living/silicon/ai/our_ai = user.mob
|
|
our_ai.deploy_to_shell(our_ai.redeploy_action.last_used_shell)
|
|
return TRUE
|