mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
bindable action buttons (#81371)
## About The Pull Request ### work started 12/12/2023 you may alt-click action buttons to bind them to a key these are subject to click cooldown and if an action successfully triggers click cooldown is triggered so you cant instantly do multiple alt-click again to unbind ## Why It's Good For The Game moving your mouse to the top left corner to do combat is not good gameplay ## Changelog 🆑 qol: you may altclick action buttons to bind them to a key /🆑 --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -75,11 +75,10 @@
|
||||
if(kb.can_use(src) && kb.down(src) && keycount >= MAX_COMMANDS_PER_KEY)
|
||||
break
|
||||
|
||||
holder?.key_down(_key, src)
|
||||
mob.focus?.key_down(_key, src)
|
||||
holder?.key_down(_key, src, full_key)
|
||||
mob.focus?.key_down(_key, src, full_key)
|
||||
mob.update_mouse_pointer()
|
||||
|
||||
|
||||
/client/verb/keyUp(_key as text)
|
||||
set instant = TRUE
|
||||
set hidden = TRUE
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Set a client's focus to an object and override these procs on that object to let it handle keypresses
|
||||
|
||||
/datum/proc/key_down(key, client/user) // Called when a key is pressed down initially
|
||||
/datum/proc/key_down(key, client/user, full_key) // Called when a key is pressed down initially
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
return
|
||||
/datum/proc/key_up(key, client/user) // Called when a key is released
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user