mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-29 23:46:34 +01:00
reworks game preferences (characters v2 staging) (#6310)
Co-authored-by: silicons <no@you.cat> Co-authored-by: LordME <58342752+TheLordME@users.noreply.github.com>
This commit is contained in:
co-authored by
silicons
LordME
parent
9f1b911556
commit
39bc14bb4a
@@ -3,13 +3,15 @@
|
||||
var/list/classic_keys
|
||||
var/name
|
||||
var/full_name
|
||||
var/description = ""
|
||||
var/description = "No description provided."
|
||||
var/category = CATEGORY_MISC
|
||||
var/weight = WEIGHT_LOWEST
|
||||
// todo: what is this for / why do we have it / should we do this?
|
||||
// keybinds using primarily signals is kind of a :/
|
||||
// because said components can't really inject keybind data into prefs..
|
||||
var/keybind_signal
|
||||
|
||||
/datum/keybinding/New()
|
||||
|
||||
// Default keys to the master "hotkey_keys"
|
||||
if(LAZYLEN(hotkey_keys) && !LAZYLEN(classic_keys))
|
||||
classic_keys = hotkey_keys.Copy()
|
||||
@@ -22,3 +24,17 @@
|
||||
|
||||
/datum/keybinding/proc/can_use(client/user)
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/proc/is_visible(client/user)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Data for a GamePreferenceKeybind
|
||||
*/
|
||||
/datum/keybinding/proc/tgui_keybinding_data()
|
||||
return list(
|
||||
"id" = name,
|
||||
"name" = full_name,
|
||||
"desc" = description,
|
||||
"category" = category,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user