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 18:56:20 +00:00
committed by GitHub
co-authored by Gaxeer
parent 337a13538c
commit c9bc4635e0
7 changed files with 62 additions and 10 deletions
+10
View File
@@ -224,3 +224,13 @@
/datum/keybinding/mob/target/l_foot
name = "Target Left Foot"
body_part = BODY_ZONE_PRECISE_L_FOOT
/datum/keybinding/mob/trigger_action_button // Don't add a name to this, shouldn't show up in the prefs menu
var/datum/action/linked_action
var/binded_to // these are expected to actually get deleted at some point, to prevent hard deletes we need to know where to remove them from the clients list
/datum/keybinding/mob/trigger_action_button/down(client/C)
. = ..()
if(C.mob.next_click > world.time)
return
linked_action.Trigger()