Rips out the old keybind system and ports a better version from /tg/ (#17216)

* Initial version

Ripped out old version and added new version

* Update some of the keybinds

* More changes

* Added hotkey sanity checks

* Misc. fixes and features

* Small fix

* Refactor keys_held

* Adds emote keybinds

* Small spelling fixes

* I always forget this one

* Add 1 second cooldown on emotes

* Fix DME

* Don't spam

* Make linter happy

* New MC init
This commit is contained in:
Ling
2023-01-04 16:55:09 +01:00
committed by GitHub
parent b8e070f311
commit 50e3477a6e
66 changed files with 1363 additions and 1470 deletions

View File

@@ -91,27 +91,7 @@
else
to_chat(src, span_danger("The Github URL is not set in the server configuration."))
return
// yogs start - Rebindable Hotkeys
/*
/client/verb/hotkeys_help()
set name = "hotkeys-help"
set category = "OOC"
var/adminhotkeys = {"<font color='purple'>
Admin:
\tF3 = asay
\tF5 = Aghost (admin-ghost)
\tF6 = player-panel
\tF7 = Buildmode
\tF8 = Invisimin
\tCtrl+F8 = Stealthmin
</font>"}
mob.hotkey_help()
if(holder)
to_chat(src, adminhotkeys)
*/
/client/verb/changelog()
set name = "Changelog"
set category = "OOC"
@@ -122,122 +102,3 @@ Admin:
prefs.lastchangelog = GLOB.changelog_hash
prefs.save_preferences()
winset(src, "infowindow.changelog", "font-style=;")
/*
/mob/proc/hotkey_help()
var/hotkey_mode = {"<font color='purple'>
Hotkey-Mode: (hotkey-mode must be on)
\tTAB = toggle hotkey-mode
\ta = left
\ts = down
\td = right
\tw = up
\tq = drop
\te = equip
\tr = throw
\tm = me
\tt = say
\to = OOC
\tb = resist
\t<B></B>h = stop pulling
\tx = swap-hand
\tz = activate held object (or y)
\tShift+e = Put held item into belt(or belt slot) or take out most recent item added.
\tShift+b = Put held item into backpack(or back slot) or take out most recent item added.
\tf = cycle-intents-left
\tg = cycle-intents-right
\t1 = help-intent
\t2 = disarm-intent
\t3 = grab-intent
\t4 = harm-intent
\tNumpad = Body target selection (Press 8 repeatedly for Head->Eyes->Mouth)
\tAlt(HOLD) = Alter movement intent
</font>"}
var/other = {"<font color='purple'>
Any-Mode: (hotkey doesn't need to be on)
\tCtrl+a = left
\tCtrl+s = down
\tCtrl+d = right
\tCtrl+w = up
\tCtrl+q = drop
\tCtrl+e = equip
\tCtrl+r = throw
\tCtrl+b = resist
\tCtrl+h = stop pulling
\tCtrl+o = OOC
\tCtrl+x = swap-hand
\tCtrl+z = activate held object (or Ctrl+y)
\tCtrl+f = cycle-intents-left
\tCtrl+g = cycle-intents-right
\tCtrl+1 = help-intent
\tCtrl+2 = disarm-intent
\tCtrl+3 = grab-intent
\tCtrl+4 = harm-intent
\tCtrl+'+/-' OR
\tShift+Mousewheel = Ghost zoom in/out
\tDEL = stop pulling
\tINS = cycle-intents-right
\tHOME = drop
\tPGUP = swap-hand
\tPGDN = activate held object
\tEND = throw
\tCtrl+Numpad = Body target selection (Press 8 repeatedly for Head->Eyes->Mouth)
</font>"}
to_chat(src, hotkey_mode)
to_chat(src, other)
/mob/living/silicon/robot/hotkey_help()
//h = talk-wheel has a nonsense tag in it because \th is an escape sequence in BYOND.
var/hotkey_mode = {"<font color='purple'>
Hotkey-Mode: (hotkey-mode must be on)
\tTAB = toggle hotkey-mode
\ta = left
\ts = down
\td = right
\tw = up
\tq = unequip active module
\t<B></B>h = stop pulling
\tm = me
\tt = say
\to = OOC
\tx = cycle active modules
\tb = resist
\tz = activate held object (or y)
\tf = cycle-intents-left
\tg = cycle-intents-right
\t1 = activate module 1
\t2 = activate module 2
\t3 = activate module 3
\t4 = toggle intents
</font>"}
var/other = {"<font color='purple'>
Any-Mode: (hotkey doesn't need to be on)
\tCtrl+a = left
\tCtrl+s = down
\tCtrl+d = right
\tCtrl+w = up
\tCtrl+q = unequip active module
\tCtrl+x = cycle active modules
\tCtrl+b = resist
\tCtrl+h = stop pulling
\tCtrl+o = OOC
\tCtrl+z = activate held object (or Ctrl+y)
\tCtrl+f = cycle-intents-left
\tCtrl+g = cycle-intents-right
\tCtrl+1 = activate module 1
\tCtrl+2 = activate module 2
\tCtrl+3 = activate module 3
\tCtrl+4 = toggle intents
\tDEL = stop pulling
\tINS = toggle intents
\tPGUP = cycle active modules
\tPGDN = activate held object
</font>"}
to_chat(src, hotkey_mode)
to_chat(src, other)
*/
// yogs end

View File

@@ -40,11 +40,6 @@ menu "menu"
command = "adminhelp"
category = "&Help"
saved-params = "is-checked"
elem
name = "&Hotkeys"
command = "hotkeys-help"
category = "&Help"
saved-params = "is-checked"
window "mainwindow"