Files
John Willard 475fe94750 Say verb & skin shenanigans (Pray is a hotkey, Whisper is in commandbar) (#95477)
## About The Pull Request

Removes Say/Me/OOC/Pray/Whisper as stat panel verbs

1. Adds a hotkey for Pray, P by default, and also adds it to the list of
say modes (so tabbing on tgui-say will show it)
2. Makes Whisper a button on the commandbar, which is literally just
``say "#``, letting players know it exists in a more direct manner.
3. You now need 2 characters to be considered "typing", so `#` for
whisper won't cause you to start to think anymore.

Also messes around with the skin a bit, moving the commandbar to be
separate from the chat window, therefore not resizing if the chat
window/stat panel splitter changes, since I was already messing with the
command bar entirely I might as well look into getting this fixed. This
will go even better with
https://github.com/tgstation/tgstation/pull/95383 as it wont stretch the
command bar when the stat panel is closed.



https://github.com/user-attachments/assets/26cd9df0-7582-445e-9f67-c03d2c9cf46d


Also adds a new Adminhelp submenu for the Pray button for additional
visibility



https://github.com/user-attachments/assets/64f31f86-92a2-4f04-b248-6bbe301919fe


My current goal is the deletion of the IC tab so I've been trying to
inch towards that.

## Why It's Good For The Game

Moves Praying & Whispering into something that's more easily seen by
newer players, and helps cut some of the more useless verbs out of the
stat panel.

This is also part of my project you can see more of here -
https://hackmd.io/443_dE5lRWeEAp9bjGcKYw?view

## Changelog

🆑
qol: Pray verb is now a hotkey, Whisper is now a command bar button, and
all say verbs have been removed from the stat panel.
qol: Admin button on the escape menu is now its own section for praying,
as well as seeing your latest ticket & admin notes.
fix: Resizing the stat panel will no longer change the size of the
command bar.
/🆑
2026-04-26 07:20:58 +03:00

93 lines
2.7 KiB
Plaintext

/atom/movable/screen/escape_menu/text
mouse_opacity = MOUSE_OPACITY_OPAQUE
maptext_width = 100
maptext_height = 8
VAR_PROTECTED/list/screen_directions = list("NORTH", "WEST")
VAR_PRIVATE/datum/escape_menu/escape_menu
VAR_PRIVATE/button_text
VAR_PRIVATE/font_size
/atom/movable/screen/escape_menu/text/Initialize(
mapload,
datum/hud/hud_owner,
datum/escape_menu/escape_menu,
button_text,
list/offset,
font_size = 12,
)
. = ..()
src.escape_menu = escape_menu
src.button_text = button_text
src.font_size = font_size
//this decides how far out you can 'click' on this, so it's important to keep it short.
//yes even here, maptext can still embed links without using clickable subtype.
src.maptext_width = max(round(length(button_text) * font_size * 0.75), font_size * 4)
src.maptext_height = (maptext_height * (font_size / 5))
src.maptext_height *= length(splittext(button_text, "\n"))
update_text()
screen_loc = "[screen_directions[1]]:[offset[1]],[screen_directions[2]]:[offset[2]]"
/atom/movable/screen/escape_menu/text/proc/update_text()
SHOULD_CALL_PARENT(TRUE)
maptext = MAPTEXT_PIXELLARI("<span style='font-size: [font_size]px; color: [text_color()]'>[button_text]</span>")
/atom/movable/screen/escape_menu/text/proc/text_color()
return enabled() ? "white" : "gray"
/atom/movable/screen/escape_menu/text/proc/enabled()
return TRUE
///Clickable text, gets underlined when hovered and has an on_click_callback.
/atom/movable/screen/escape_menu/text/clickable
VAR_PRIVATE/datum/callback/on_click_callback
VAR_PRIVATE/hovered = FALSE
/atom/movable/screen/escape_menu/text/clickable/Initialize(
mapload,
datum/hud/hud_owner,
datum/escape_menu/escape_menu,
button_text,
list/offset,
font_size = 24,
on_click_callback,
)
. = ..()
src.on_click_callback = on_click_callback
/atom/movable/screen/escape_menu/text/clickable/Destroy()
on_click_callback = null
return ..()
/atom/movable/screen/escape_menu/text/clickable/update_text()
. = ..()
if (hovered)
maptext = "<u>[maptext]</u>"
/atom/movable/screen/escape_menu/text/clickable/Click(location, control, params)
if (!enabled())
return
on_click_callback.InvokeAsync(src)
/atom/movable/screen/escape_menu/text/clickable/MouseEntered(location, control, params)
set_hovered(TRUE)
/atom/movable/screen/escape_menu/text/clickable/MouseExited(location, control, params)
set_hovered(FALSE)
/// Sets the hovered state of the button, and updates the text
/atom/movable/screen/escape_menu/text/clickable/proc/set_hovered(hovered)
if (src.hovered == hovered)
return
src.hovered = hovered
update_text()
/atom/movable/screen/escape_menu/text/clickable/center
screen_directions = list("NORTH", "CENTER")
/atom/movable/screen/escape_menu/text/center
screen_directions = list("NORTH", "CENTER")