mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
keybind signal support, ported from TGMC (#52219)
* keybind signal support, ported from TGMC * Thank you linter * remove unused and extra defines * move signal defines up and fix emote keybind runtimes * Apply suggestions * Update keybinding.dm * Missed this one in the upstream merge * Ignore keybindings without names * back to the OG * Update living.dm * Update living.dm * got it * trailing newline * Update code/datums/keybinding/living.dm Co-authored-by: Rohesie <rohesie@gmail.com> Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
committed by
SkyratBot
co-authored by
Rohesie
parent
41c6428ca6
commit
dc5840dc4e
@@ -9,13 +9,16 @@
|
||||
var/keybind_signal
|
||||
|
||||
/datum/keybinding/New()
|
||||
if(!keybind_signal)
|
||||
CRASH("Keybind [src] called unredefined down() without a keybind_signal.")
|
||||
|
||||
// Default keys to the master "hotkey_keys"
|
||||
if(LAZYLEN(hotkey_keys) && !LAZYLEN(classic_keys))
|
||||
classic_keys = hotkey_keys.Copy()
|
||||
|
||||
/datum/keybinding/proc/down(client/user)
|
||||
return FALSE
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
return SEND_SIGNAL(user.mob, keybind_signal) & COMSIG_KB_ACTIVATED
|
||||
|
||||
/datum/keybinding/proc/up(client/user)
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user