More keybindings (#16329)

* Macros+functions+changelog

* Fixed changelog mistype

* Readded the old up/down keybinds, added preference for the toggle

* Removed toggle as requested by head dev

* sf
This commit is contained in:
Fluffy
2023-12-25 19:48:22 +00:00
committed by GitHub
parent 08fb30c3c3
commit 1e41b55f50
3 changed files with 158 additions and 7 deletions
+38
View File
@@ -1023,6 +1023,44 @@ default behaviour is:
if(hud_used?.move_intent)
hud_used.move_intent.Click()
/**
* Used by a macro in skin.dmf to toggle the throw
*/
/mob/living/verb/throw_intent_keyDown()
set hidden = 1
set name = "throw_intent"
if(!(src.in_throw_mode))
toggle_throw_mode()
/mob/living/verb/throw_intent_keyUp()
set hidden = 1
set name = "throw_intent_up"
if(src.in_throw_mode)
toggle_throw_mode()
/**
* User by a macro in skin.dmf to toggle the running
*/
/mob/living/verb/run_intent_keyDown()
set hidden = 1
set name = "run_intent"
if(usr?.m_intent != M_WALK)
return
if(hud_used?.move_intent)
hud_used.move_intent.Click()
/mob/living/verb/run_intent_keyUp()
set hidden = 1
set name = "run_intent_up"
if(usr?.m_intent != M_RUN)
return
if(hud_used?.move_intent)
hud_used.move_intent.Click()
/mob/living/proc/add_hallucinate(var/amount)
hallucination += amount
hallucination += amount
@@ -0,0 +1,44 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Fluffyghost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Added keymap R, to enable throw mode, lifting the R key disables throw mode, clicking the HUD icon works as before (toggle)."
- rscadd: "Added keymap SPACE, to enable run mode, lifting the SPACE key disables run mode, clicking the HUD icon works as before (toggle)."
- rscadd: "Added SHIFT+R as a keymap to resist."
- rscadd: "Added CTRL+PGUP/CTRL+PGDOWN as a keymap to Move-upwards and Move-down, respectively."
+76 -7
View File
@@ -122,9 +122,6 @@ macro "borghotkeymode"
elem
name = "CTRL+Q"
command = "unequip-module"
elem
name = "R"
command = ".southwest"
elem
name = "CTRL+R"
command = ".southwest"
@@ -218,6 +215,19 @@ macro "borghotkeymode"
elem
name = "NUMPAD3"
command = "body-l-leg"
elem
name = "CTRL+Northeast"
command = "Move-Upwards"
elem
name = "CTRL+Southeast"
command = "Move-Down"
elem
name = ","
command = "Move-Upwards"
elem
name = "."
command = "Move-Down"
macro "macro"
elem
@@ -388,6 +398,34 @@ macro "macro"
elem
name = "CTRL+NUMPAD3"
command = "body-l-leg"
elem
name = "CTRL+Northeast"
command = "Move-Upwards"
elem
name = "CTRL+Southeast"
command = "Move-Down"
elem
name = ","
command = "Move-Upwards"
elem
name = "."
command = "Move-Down"
elem
name = "Space"
command = "run_intent"
elem
name = "Space+UP"
command = "run_intent_up"
elem
name = "SHIFT+R"
command = "Resist"
elem
name = "R"
command = "throw_intent"
elem
name = "R+UP"
command = "throw_intent_up"
macro "hotkeymode"
elem
@@ -525,9 +563,6 @@ macro "hotkeymode"
elem
name = "CTRL+Q"
command = ".northwest"
elem
name = "R"
command = ".southwest"
elem
name = "CTRL+R"
command = ".southwest"
@@ -621,12 +656,34 @@ macro "hotkeymode"
elem
name = "NUMPAD3"
command = "body-l-leg"
elem
name = "CTRL+Northeast"
command = "Move-Upwards"
elem
name = "CTRL+Southeast"
command = "Move-Down"
elem
name = ","
command = "move-upwards"
elem
name = "."
command = "move-down"
command = "Move-Down"
elem
name = "Space"
command = "run_intent"
elem
name = "Space+UP"
command = "run_intent_up"
elem
name = "SHIFT+R"
command = "Resist"
elem
name = "R"
command = "throw_intent"
elem
name = "R+UP"
command = "throw_intent_up"
macro "borgmacro"
elem
@@ -791,6 +848,18 @@ macro "borgmacro"
elem
name = "CTRL+NUMPAD3"
command = "body-l-leg"
elem
name = "CTRL+Northeast"
command = "Move-Upwards"
elem
name = "CTRL+Southeast"
command = "Move-Down"
elem
name = ","
command = "Move-Upwards"
elem
name = "."
command = "Move-Down"
menu "menu"