Files
ff006aa4a5 verb macro system (pr 1/3) (#96720)
## About The Pull Request

just macro-izes all the usages of verbs in the codebase as a
pre-requisite to my follow up pr that serializes all the verbs arguments
so we can tgui-ify the command bar, so we can then put it on the
onscreen map.

this also basically does the same as #94487 so can easily be integrated
into the verb queueing stuff... but does not actually do any verb
queueing by itself. basically im just trying to be
https://github.com/tgstation/tgstation/labels/Atomic
## Why It's Good For The Game
it doesn't really do anything by itself but it does let us do more stuff

## Changelog
🆑
code: the backend to all verbs in the game has been played with, please
report any issues to github
/🆑

---------

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
2026-07-04 02:45:07 -04:00

101 lines
2.9 KiB
Plaintext

/datum/keybinding/client
category = CATEGORY_CLIENT
weight = WEIGHT_HIGHEST
/datum/keybinding/client/admin_help
hotkey_keys = list("F1")
name = "admin_help"
full_name = "Admin Help"
description = "Ask an admin for help."
keybind_signal = COMSIG_KB_CLIENT_GETHELP_DOWN
/datum/keybinding/client/admin_help/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
user.adminhelp()
return TRUE
/datum/keybinding/client/screenshot
hotkey_keys = list("F2")
name = "quick screenshot"
full_name = "Quick Screenshot"
description = "Take a screenshot, which will be stored in BYOND's screenshots folder."
keybind_signal = COMSIG_KB_CLIENT_SCREENSHOT_DOWN
can_edit = FALSE
/datum/keybinding/client/screenshot/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
to_chat(user, span_notice("Screenshot saved in 'BYOND/screenshots' folder."))
//This is dealt by BYOND. Keeping this here in case that ever changes, though this command doesn't actually work when manually called.
//winset(user, null, "command=.screenshot auto")
return TRUE
/datum/keybinding/client/screenshot_loc
hotkey_keys = list("ShiftF2")
name = "screenshot as"
full_name = "Save Screenshot as"
description = "Take a screenshot and save it at a specific location."
keybind_signal = COMSIG_KB_CLIENT_SCREENSHOT_AS_DOWN
can_edit = FALSE
/datum/keybinding/client/screenshot_loc/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
//This is dealt by BYOND. Keeping this here in case that ever changes.
//winset(user, null, "command=.screenshot")
return TRUE
/datum/keybinding/client/toggle_fullscreen
hotkey_keys = list("F11")
name = "toggle_fullscreen"
full_name = "Toggle Fullscreen"
description = "Makes the game window fullscreen."
keybind_signal = COMSIG_KB_CLIENT_FULLSCREEN_DOWN
/datum/keybinding/client/toggle_fullscreen/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
user.toggle_fullscreen()
return TRUE
/datum/keybinding/client/minimal_hud
hotkey_keys = list("F12")
name = "minimal_hud"
full_name = "Minimal HUD"
description = "Hide most HUD features"
keybind_signal = COMSIG_KB_CLIENT_MINIMALHUD_DOWN
/datum/keybinding/client/minimal_hud/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
if(user.mob.hud_used)
user.mob.hud_used.show_hud() //Shows the next hud preset
to_chat(user, span_info("Switched HUD mode. Press F12 to toggle."))
else
to_chat(user, span_warning("This mob type does not use a HUD."))
return TRUE
/datum/keybinding/client/close_every_ui
hotkey_keys = list("Northwest") // HOME key
name = "close_every_ui"
full_name = "Close Open UIs"
description = "Closes all UI windows you have open."
keybind_signal = COMSIG_KB_CLIENT_CLOSEUI_DOWN
/datum/keybinding/client/close_every_ui/down(client/user, turf/target, mousepos_x, mousepos_y)
. = ..()
if(.)
return
SStgui.close_user_uis(user.mob)
return TRUE