mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user