byond - Modules - TypesVar Details - Proc Details

/datum/tgui_say

The tgui say modal. This initializes an input window which hides until the user presses one of the speech hotkeys. Once something is entered, it will delegate the speech to the proper channel.

Vars

clientThe user who opened the window
hurt_phrasesInjury phrases to blurt out
max_lengthMax message length
windowThe modal window
window_openBoolean for whether the tgui_say was opened by the user.

Procs

NewCreates the new input window to exist in the background.
alter_entryAlters text when players are injured. Adds text, trims left and right side
closeCloses the window serverside. Closes any open chat bubbles regardless of preference. Logs the event.
delegate_speechNo OOC leaks Random trimming for larger sentences Otherwise limit trim to just last letter Delegates the speech to the proper channel.
force_sayForce say handler. Sends a message to the say modal to send its current value.
handle_entryHandles text entry and forced speech.
initializeAfter a brief period, injects the scripts into the window to listen for open commands.
loadEnsures nothing funny is going on window load. Minimizes the window, sets max length, closes all typing and thinking indicators. This is triggered as soon as the window sends the "ready" message.
on_messageThe equivalent of ui_act, this waits on messages from the window and delegates actions.
openSets the window as "opened" server side, though it is already visible to the user. We do this to set local vars & start typing (if enabled and in an IC channel). Logs the event.
start_thinkingSets the mob as "thinking" - with indicator and variable thinking_IC
start_typingHandles the user typing. After a brief period of inactivity, signals the client mob to revert to the "thinking" icon.
stop_thinkingRemoves typing/thinking indicators and flags the mob as not thinking
stop_typingCallback to remove the typing indicator after a brief period of inactivity. If the user was typing IC, the thinking indicator is shown.

Var Details

client

The user who opened the window

hurt_phrases

Injury phrases to blurt out

max_length

Max message length

window

The modal window

window_open

Boolean for whether the tgui_say was opened by the user.

Proc Details

New

Creates the new input window to exist in the background.

alter_entry

Alters text when players are injured. Adds text, trims left and right side

Arguments: payload - a string list containing entry & channel Returns: string - the altered entry

close

Closes the window serverside. Closes any open chat bubbles regardless of preference. Logs the event.

delegate_speech

No OOC leaks Random trimming for larger sentences Otherwise limit trim to just last letter Delegates the speech to the proper channel.

Arguments: entry - the text to broadcast channel - the channel to broadcast in Returns: boolean - on success or failure

force_say

Force say handler. Sends a message to the say modal to send its current value.

handle_entry

Handles text entry and forced speech.

Arguments: type - a string "entry" or "force" based on how this function is called payload - a string list containing entry & channel Returns: boolean - success or failure

initialize

After a brief period, injects the scripts into the window to listen for open commands.

load

Ensures nothing funny is going on window load. Minimizes the window, sets max length, closes all typing and thinking indicators. This is triggered as soon as the window sends the "ready" message.

on_message

The equivalent of ui_act, this waits on messages from the window and delegates actions.

open

Sets the window as "opened" server side, though it is already visible to the user. We do this to set local vars & start typing (if enabled and in an IC channel). Logs the event.

Arguments: payload - A list containing the channel the window was opened in.

start_thinking

Sets the mob as "thinking" - with indicator and variable thinking_IC

start_typing

Handles the user typing. After a brief period of inactivity, signals the client mob to revert to the "thinking" icon.

stop_thinking

Removes typing/thinking indicators and flags the mob as not thinking

stop_typing

Callback to remove the typing indicator after a brief period of inactivity. If the user was typing IC, the thinking indicator is shown.