Chat Message Overlay

Datum for generating a message overlay on the map
Vars | |
animate_lifespan | Our animation lifespan, how long this message will last |
---|---|
animate_start | When we started animating the message |
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 |
message | The visual element of the chat messsage |
message_loc | The location in which the message is appearing |
owned_by | The client who heard this message |
Procs | |
New | Constructs a chat message overlay |
colorize_string | Gets a color for a name, will return the same color for a given string consistently within a round.atom |
finish_image_generation | 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 |
get_current_alpha | Returns the current alpha of the message based on the time spent |
on_parent_qdel | Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal |
sanitize_color | Ensures a colour is bright enough for the system |
Var Details
animate_lifespan

Our animation lifespan, how long this message will last
animate_start

When we started animating the message
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
message

The visual element of the chat messsage
message_loc

The location in which the message is appearing
owned_by

The client who heard this message
Proc Details
New
Constructs a chat message overlay
Arguments:
- text - The text content of the overlay
- target - The target atom to display the overlay at
- owner - The mob that owns this overlay, only this mob will be able to view it
- italics - Should we use italics or not
- lifespan - The lifespan of the message in deciseconds
- symbol - The symbol type of the message
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:
- name - The name to generate a color for
- sat_shift - A value between 0 and 1 that will be multiplied against the saturation
- lum_shift - A value between 0 and 1 that will be multiplied against the luminescence
finish_image_generation
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:
- text - The text content of the overlay
- target - The target atom to display the overlay at
- owner - The mob that owns this overlay, only this mob will be able to view it
- radio_speech - Fancy shmancy radio icon represents that we use radio
- lifespan - The lifespan of the message in deciseconds
- italics - Just copy and paste, sir
- size - Size of the message
- symbol - The symbol type of the message
get_current_alpha
Returns the current alpha of the message based on the time spent
on_parent_qdel
Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal
sanitize_color
Ensures a colour is bright enough for the system
This proc is used to brighten parts of a colour up if its too dark, and looks bad
Arguments:
- hex - Hex colour to be brightened up