Chat Message Overlay
Datum for generating a message overlay on the map
Vars | |
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 |
message | The visual element of the chat messsage |
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 |
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 |
end_of_life | Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion, sets time for scheduling deletion and re-enters the runechat SS for qdeling |
enter_subsystem | Enters the runechat subsystem with this chatmessage, inserting it into the end-of-life queue |
generate_image | Generates a chat message image representation |
leave_subsystem | Removes this chatmessage datum from the runechat subsystem |
on_parent_qdel | Calls 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
message
The visual element of the chat messsage
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:
- 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
- extra_classes - Extra classes to apply to the span that holds the text
- lifespan - The lifespan of the message in deciseconds
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
end_of_life
Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion, sets time for scheduling deletion and re-enters the runechat SS for qdeling
Arguments:
- fadetime - The amount of time to animate the message's fadeout for
enter_subsystem
Enters the runechat subsystem with this chatmessage, inserting it into the end-of-life queue
This will also account for a chatmessage already being registered, and in which case the position will be updated to remove it from the previous location if necessary
Arguments:
- new_sched_destruction Optional, when provided is used to update an existing message with the new specified time
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
- extra_classes - Extra classes to apply to the span that holds the text
- lifespan - The lifespan of the message in deciseconds
leave_subsystem
Removes this chatmessage datum from the runechat subsystem
on_parent_qdel
Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal