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