mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Create client preference for if hotkey mode is enabled by default on login or not.
* Adds preference setting for wether hotkeys should default to enabled or disabled. * Fixes bug for CTRL+NUMPAD8 using old verb name for toggling head.
This commit is contained in:
@@ -188,3 +188,14 @@ Any-Mode: (hotkey doesn't need to be on)
|
||||
src << other
|
||||
if(holder)
|
||||
src << admin
|
||||
|
||||
// Set the DreamSeeker input macro to the type appropriate for its mob
|
||||
/client/proc/set_hotkeys_macro(macro_name = "macro", hotkey_macro_name = "hotkeymode", hotkeys_enabled = null)
|
||||
// If hotkeys mode was not specified, fall back to choice of default in client preferences.
|
||||
if(isnull(hotkeys_enabled))
|
||||
hotkeys_enabled = is_preference_enabled(/datum/client_preference/hotkeys_default)
|
||||
|
||||
if(hotkeys_enabled)
|
||||
winset(src, null, "mainwindow.macro=[hotkey_macro_name] hotkey_toggle.is-checked=true mapwindow.map.focus=true")
|
||||
else
|
||||
winset(src, null, "mainwindow.macro=[macro_name] hotkey_toggle.is-checked=false input.focus=true")
|
||||
|
||||
Reference in New Issue
Block a user