From 922b70239c3c90eec1d219b7ccd094db28af4f9c Mon Sep 17 00:00:00 2001 From: Arturlang <24881678+Arturlang@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:06:54 +0300 Subject: [PATCH] Fix keybinding action buttons (#92396) ## About The Pull Request Put a ! where there should not be. Whoops. Fixes https://github.com/tgstation/tgstation/issues/92395 Fixes https://github.com/tgstation/tgstation/issues/92348 ## Why It's Good For The Game Bug fix and working feature good ## Changelog :cl: fix: Action button binding works again /:cl: --- code/_onclick/hud/action_button.dm | 2 +- code/datums/actions/action.dm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index c25d251af83..88508c11e47 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -56,7 +56,7 @@ var/list/modifiers = params2list(params) if(LAZYACCESS(modifiers, ALT_CLICK)) - linked_action?.begin_creating_bind(usr) + linked_action?.begin_creating_bind(src, usr) return TRUE if(LAZYACCESS(modifiers, SHIFT_CLICK)) var/datum/hud/our_hud = usr.hud_used diff --git a/code/datums/actions/action.dm b/code/datums/actions/action.dm index ffb37b1c066..65c314d4fc9 100644 --- a/code/datums/actions/action.dm +++ b/code/datums/actions/action.dm @@ -432,15 +432,15 @@ /datum/action/proc/is_action_active(atom/movable/screen/movable/action_button/current_button) return FALSE -/datum/action/proc/begin_creating_bind(mob/user) - if(!user != owner) +/datum/action/proc/begin_creating_bind(atom/movable/screen/movable/action_button/current_button, mob/user) + if(!current_button || user != owner) return if(!isnull(full_key)) full_key = null - update_button_status(src) + update_button_status(current_button) return full_key = tgui_input_keycombo(user, "Please bind a key for this action.") - update_button_status(src) + update_button_status(current_button) /datum/action/proc/keydown(mob/source, key, client/client, full_key) SIGNAL_HANDLER