makes action buttons bindable to keybinds (#22390)

* makes action buttons bindable to keybinds

* i'm just based like that

* zamn

* fix

* More alterations

* bruh

* runtime fix

* fixed up the jank

* Update code/_onclick/hud/action_button.dm

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>

* Update code/modules/input/keybindings_procs.dm

---------

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
This commit is contained in:
GDN
2023-12-11 12:56:20 -06:00
committed by GitHub
parent 337a13538c
commit c9bc4635e0
7 changed files with 62 additions and 10 deletions
+6
View File
@@ -12,5 +12,11 @@
movement_kb_dirs[key] = KBM.move_dir
else
active_keybindings[key] += list(KB)
if(!mob) // Clients can join before world/new is setup, so we gotta mob check em
return active_keybindings
for(var/datum/action/action as anything in mob.actions)
if(action.button?.linked_keybind?.binded_to)
var/datum/keybinding/mob/trigger_action_button/linked_bind = action.button.linked_keybind
active_keybindings[linked_bind.binded_to] += list(linked_bind)
return active_keybindings