/tg/ Station 13 - Modules - TypesVar Details - Proc Details

Chat Message Overlay

Datum for generating a message overlay on the map

Vars

approx_linesContains the approximate amount of lines for height decay
current_z_idxThe current index used for adjusting the layer of each sequential chat message such that recent messages will overlay older ones
eol_completeContains the time that the EOL for the message will be complete, used for qdel scheduling
fadertimerContains ID of assigned timer for end_of_life fading event
isFadingStates if end_of_life is being executed
messageThe visual element of the chat message
message_locThe location in which the message is appearing
nextContains the reference to the next chatmessage in the bucket, used by runechat subsystem
owned_byThe client who heard this message
prevContains the reference to the previous chatmessage in the bucket, used by runechat subsystem
scheduled_destructionContains the scheduled destruction time, used for scheduling EOL

Procs

NewConstructs a chat message overlay
colorize_stringGets a color for a name, will return the same color for a given string consistently within a round.atom
end_of_lifeApplies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion, sets timer for scheduling deletion
finish_image_generationCached icons to show what language the user is speaking finishes the image generation after the MeasureText() call in generate_image(). necessary because after that call the proc can resume at the end of the tick and cause overtime.
generate_imageGenerates a chat message image representation
on_parent_qdelCalls qdel on the chatmessage when its parent is deleted, used to register qdel signal

Var Details

approx_lines

Contains the approximate amount of lines for height decay

current_z_idx

The current index used for adjusting the layer of each sequential chat message such that recent messages will overlay older ones

eol_complete

Contains the time that the EOL for the message will be complete, used for qdel scheduling

fadertimer

Contains ID of assigned timer for end_of_life fading event

isFading

States if end_of_life is being executed

message

The visual element of the chat message

message_loc

The location in which the message is appearing

next

Contains the reference to the next chatmessage in the bucket, used by runechat subsystem

owned_by

The client who heard this message

prev

Contains the reference to the previous chatmessage in the bucket, used by runechat subsystem

scheduled_destruction

Contains the scheduled destruction time, used for scheduling EOL

Proc Details

New

Constructs a chat message overlay

Arguments:

colorize_string

Gets a color for a name, will return the same color for a given string consistently within a round.atom

Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map.

Arguments:

end_of_life

Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion, sets timer for scheduling deletion

Arguments:

finish_image_generation

Cached icons to show what language the user is speaking finishes the image generation after the MeasureText() call in generate_image(). necessary because after that call the proc can resume at the end of the tick and cause overtime.

generate_image

Generates a chat message image representation

Arguments:

on_parent_qdel

Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal