mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-24 14:27:15 +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,
|
||||
)
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
/datum/keybinding/admin/can_use(client/user)
|
||||
return user.holder ? TRUE : FALSE
|
||||
|
||||
/datum/keybinding/admin/is_visible(client/user)
|
||||
return !!user.holder
|
||||
|
||||
/datum/keybinding/admin/admin_say
|
||||
hotkey_keys = list("F5")
|
||||
name = "admin_say"
|
||||
@@ -16,7 +19,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/admin/admin_ghost
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "admin_ghost"
|
||||
full_name = "Aghost"
|
||||
description = "Go ghost"
|
||||
@@ -36,7 +39,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/admin/toggle_buildmode_self
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "toggle_buildmode_self"
|
||||
full_name = "Toggle Buildmode Self"
|
||||
description = "Toggles buildmode"
|
||||
@@ -46,7 +49,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/admin/stealthmode
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "stealth_mode"
|
||||
full_name = "Stealth mode"
|
||||
description = "Enters stealth mode"
|
||||
@@ -76,7 +79,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/admin/deadsay
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "dsay"
|
||||
full_name = "deadsay"
|
||||
description = "Allows you to send a message to dead chat"
|
||||
@@ -86,7 +89,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/admin/deadmin
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "deadmin"
|
||||
full_name = "Deadmin"
|
||||
description = "Shed your admin powers"
|
||||
@@ -96,7 +99,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/admin/readmin
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "readmin"
|
||||
full_name = "Readmin"
|
||||
description = "Regain your admin powers"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
hotkey_keys = list("1")
|
||||
name = "select_help_intent"
|
||||
full_name = "Select help intent"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_CARBON
|
||||
|
||||
/datum/keybinding/carbon/select_help_intent/down(client/user)
|
||||
@@ -44,7 +44,7 @@
|
||||
hotkey_keys = list("2")
|
||||
name = "select_disarm_intent"
|
||||
full_name = "Select disarm intent"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_CARBON
|
||||
|
||||
/datum/keybinding/carbon/select_disarm_intent/down(client/user)
|
||||
@@ -55,7 +55,7 @@
|
||||
hotkey_keys = list("3")
|
||||
name = "select_grab_intent"
|
||||
full_name = "Select grab intent"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_CARBON
|
||||
|
||||
/datum/keybinding/carbon/select_grab_intent/down(client/user)
|
||||
@@ -66,7 +66,7 @@
|
||||
hotkey_keys = list("4")
|
||||
name = "select_harm_intent"
|
||||
full_name = "Select harm intent"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_CARBON
|
||||
|
||||
/datum/keybinding/carbon/select_harm_intent/down(client/user)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
weight = WEIGHT_HIGHEST
|
||||
|
||||
/datum/keybinding/client/admin_help
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "admin_help"
|
||||
full_name = "Admin Help"
|
||||
description = "Ask an admin for help."
|
||||
@@ -13,7 +13,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/client/screenshot
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "screenshot"
|
||||
full_name = "Screenshot"
|
||||
description = "Take a screenshot."
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/emote_key
|
||||
|
||||
/datum/keybinding/emote/proc/link_to_emote(datum/emote/faketype)
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
emote_key = initial(faketype.key)
|
||||
name = initial(faketype.key)
|
||||
full_name = capitalize(initial(faketype.key))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
hotkey_keys = list("CtrlW", "CtrlNorth")
|
||||
name = "face_north"
|
||||
full_name = "Face North"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/face_north/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -17,7 +17,7 @@
|
||||
hotkey_keys = list("CtrlD", "CtrlEast")
|
||||
name = "face_east"
|
||||
full_name = "Face East"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/face_east/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -28,7 +28,7 @@
|
||||
hotkey_keys = list("CtrlS", "CtrlSouth")
|
||||
name = "face_south"
|
||||
full_name = "Face South"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/face_south/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -39,7 +39,7 @@
|
||||
hotkey_keys = list("CtrlA", "CtrlWest")
|
||||
name = "face_west"
|
||||
full_name = "Face West"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/face_west/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -50,7 +50,7 @@
|
||||
hotkey_keys = list("J", "Delete")
|
||||
name = "stop_pulling"
|
||||
full_name = "Stop pulling"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/stop_pulling/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -64,7 +64,7 @@
|
||||
hotkey_keys = list("Northwest", "F") // HOME
|
||||
name = "cycle_intent_right"
|
||||
full_name = "cycle intent right"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/cycle_intent_right/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -75,7 +75,7 @@
|
||||
hotkey_keys = list("Insert", "G")
|
||||
name = "cycle_intent_left"
|
||||
full_name = "cycle intent left"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/cycle_intent_left/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -86,7 +86,7 @@
|
||||
hotkey_keys = list("X", "Northeast") // PAGEUP
|
||||
name = "swap_hands"
|
||||
full_name = "Swap hands"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/swap_hands/down(client/user)
|
||||
var/mob/M = user.mob
|
||||
@@ -202,7 +202,7 @@
|
||||
hotkey_keys = list("Q")
|
||||
name = "drop_item"
|
||||
full_name = "Drop Item"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/drop_item/down(client/user)
|
||||
if(isrobot(user.mob)) //cyborgs can't drop items
|
||||
@@ -218,8 +218,8 @@
|
||||
/datum/keybinding/mob/toggle_gun_mode
|
||||
hotkey_keys = list("J")
|
||||
name = "toggle_gun_mode"
|
||||
full_name = "Toggle gun mode between aiming/hostage-taking and immediate fire."
|
||||
description = ""
|
||||
full_name = "Aim / Fire Toggle"
|
||||
description = "Toggle your gun between taking aim at someone/taking hostages, and immediately firing on click."
|
||||
|
||||
/datum/keybinding/mob/toggle_gun_mode/down(client/user)
|
||||
user.mob.toggle_gun_mode()
|
||||
@@ -242,7 +242,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/mob/toggle_move_intent_alternative
|
||||
hotkey_keys = list("Unbound")
|
||||
hotkey_keys = list()
|
||||
name = "toggle_move_intent_alt"
|
||||
full_name = "press to cycle move intent"
|
||||
description = "Pressing this cycle to the opposite move intent, does not cycle back"
|
||||
@@ -256,7 +256,7 @@
|
||||
hotkey_keys = list("Numpad8")
|
||||
name = "target_head_cycle"
|
||||
full_name = "Target: Cycle head"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_head_cycle/down(client/user)
|
||||
user.body_toggle_head()
|
||||
@@ -266,7 +266,7 @@
|
||||
hotkey_keys = list("Numpad4")
|
||||
name = "target_r_arm"
|
||||
full_name = "Target: right arm"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_r_arm/down(client/user)
|
||||
user.body_r_arm()
|
||||
@@ -276,7 +276,7 @@
|
||||
hotkey_keys = list("Numpad5")
|
||||
name = "target_body_chest"
|
||||
full_name = "Target: Body"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_body_chest/down(client/user)
|
||||
user.body_chest()
|
||||
@@ -286,7 +286,7 @@
|
||||
hotkey_keys = list("Numpad6")
|
||||
name = "target_left_arm"
|
||||
full_name = "Target: left arm"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_left_arm/down(client/user)
|
||||
user.body_l_arm()
|
||||
@@ -296,7 +296,7 @@
|
||||
hotkey_keys = list("Numpad1")
|
||||
name = "target_right_leg"
|
||||
full_name = "Target: Right leg"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_right_leg/down(client/user)
|
||||
user.body_r_leg()
|
||||
@@ -306,7 +306,7 @@
|
||||
hotkey_keys = list("Numpad2")
|
||||
name = "target_body_groin"
|
||||
full_name = "Target: Groin"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_body_groin/down(client/user)
|
||||
user.body_groin()
|
||||
@@ -316,7 +316,7 @@
|
||||
hotkey_keys = list("Numpad3")
|
||||
name = "target_left_leg"
|
||||
full_name = "Target: left leg"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
|
||||
/datum/keybinding/mob/target_left_leg/down(client/user)
|
||||
user.body_l_leg()
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
hotkey_keys = list("CtrlShiftW", "CtrlShiftNorth")
|
||||
name = "pixel_shift_north"
|
||||
full_name = "Pixel Shift North"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_MOVEMENT
|
||||
|
||||
/datum/keybinding/mob/shift_north/down(client/user)
|
||||
@@ -106,7 +106,7 @@
|
||||
hotkey_keys = list("CtrlShiftD", "CtrlShiftEast")
|
||||
name = "pixel_shift_east"
|
||||
full_name = "Pixel Shift East"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_MOVEMENT
|
||||
|
||||
/datum/keybinding/mob/shift_east/down(client/user)
|
||||
@@ -118,7 +118,7 @@
|
||||
hotkey_keys = list("CtrlShiftS", "CtrlShiftSouth")
|
||||
name = "pixel_shift_south"
|
||||
full_name = "Pixel Shift South"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_MOVEMENT
|
||||
|
||||
/datum/keybinding/mob/shift_south/down(client/user)
|
||||
@@ -130,7 +130,7 @@
|
||||
hotkey_keys = list("CtrlShiftA", "CtrlShiftWest")
|
||||
name = "pixel_shift_west"
|
||||
full_name = "Pixel Shift West"
|
||||
description = ""
|
||||
description = "No description provided."
|
||||
category = CATEGORY_MOVEMENT
|
||||
|
||||
/datum/keybinding/mob/shift_west/down(client/user)
|
||||
|
||||
Reference in New Issue
Block a user