event_logger 
Datum for the event logger. One of these is made, and everyone shares it. So be nice. This keeps tracks of everything related to the logger
Vars | |
| awaiting_pick_user | The mob currently waiting to click a target for pick-target mode, or null. |
|---|---|
| categories | Assoc list: category name -> enabled (TRUE/FALSE). |
| category_colors | Assoc list: category name -> hex color, assigned when a category is first seen. |
| category_palette | List of colors we use for categories. We loop around once we run out |
| display_map | Assoc list: REF(source datum) -> REF(display datum). Events from the source appear under the display datum's track. |
| events_by_id | Assoc list: string event id -> event assoc list, for quick look-up when selecting events |
| next_event_id | Incrementing id assigned to each logged event. |
| running | Whether the logger is actively recording. |
| selected_ref | Ref string of the currently selected track (for the info panel). |
| time_start | world.time at which logging first started (null until first start). |
| tracks | Assoc list: ref string -> /datum/event_logger_track |
| user_overlays | Assoc list: mob -> list of /image, for overlay cleanup. |
Procs | |
| _add_event | Internal: Sets the event up, making a track if necesary. Also turns the instance into a REF() at this point |
| _apply_event_overlays | Push world-space highlight overlays to the user's client for the given events. |
| _clear_all_overlays | Remove all overlays for all users. |
| _clear_user_overlays | Remove all overlays for a specific user. |
| _end_pick_target | Ends pick-target mode, unregistering the click signal and clearing the awaiting_pick_user var. |
| _make_line_images | Draw a line of images similar to beams but client-side. I couldn't find anything like this yet so here we are. Maybe making this a global is a good idea. |
| _make_tile_image | Creates a single coloured tile overlay image. |
| add_track | Ensures a track exists for ref_string. Safe to call multiple times. |
| clear | Clears all tracks, categories and overlays. |
| get_category_color | Returns the hex color string for a category, or white if unknown. |
| log_event_lines | Log a line event (draws a line between 2 turfs). |
| log_event_location | Log a location event (highlights a single tile). I should remove this one as turfs does the same thing essentially |
| log_event_maptext | Log a maptext event (renders a floating text label at the turf when selected). text_string is the string to display at the turf. |
| log_event_path | Log a path event (renders directional arrows + start/end markers for a list of turfs in order from start to finish). |
| log_event_text | Log a plain text event. Has no world-visuals, just puts text into the menu |
| log_event_turfs | Log a turfs event (highlights a set of tiles). |
| on_pick_target_click | Signal handler: fired when the user clicks something while in pick-target mode. |
| toggle_pick_target | Enter pick-target mode: the next atom the user clicks gets DF_EVLOGGING set. |
| ui_assets | Tgui stuff below!! |
Var Details
awaiting_pick_user 
The mob currently waiting to click a target for pick-target mode, or null.
categories 
Assoc list: category name -> enabled (TRUE/FALSE).
category_colors 
Assoc list: category name -> hex color, assigned when a category is first seen.
category_palette 
List of colors we use for categories. We loop around once we run out
display_map 
Assoc list: REF(source datum) -> REF(display datum). Events from the source appear under the display datum's track.
events_by_id 
Assoc list: string event id -> event assoc list, for quick look-up when selecting events
next_event_id 
Incrementing id assigned to each logged event.
running 
Whether the logger is actively recording.
selected_ref 
Ref string of the currently selected track (for the info panel).
time_start 
world.time at which logging first started (null until first start).
tracks 
Assoc list: ref string -> /datum/event_logger_track
user_overlays 
Assoc list: mob -> list of /image, for overlay cleanup.
Proc Details
_add_event
Internal: Sets the event up, making a track if necesary. Also turns the instance into a REF() at this point
_apply_event_overlays
Push world-space highlight overlays to the user's client for the given events.
_clear_all_overlays
Remove all overlays for all users.
_clear_user_overlays
Remove all overlays for a specific user.
_end_pick_target
Ends pick-target mode, unregistering the click signal and clearing the awaiting_pick_user var.
_make_line_images
Draw a line of images similar to beams but client-side. I couldn't find anything like this yet so here we are. Maybe making this a global is a good idea.
_make_tile_image
Creates a single coloured tile overlay image.
add_track
Ensures a track exists for ref_string. Safe to call multiple times.
clear
Clears all tracks, categories and overlays.
get_category_color
Returns the hex color string for a category, or white if unknown.
log_event_lines
Log a line event (draws a line between 2 turfs).
log_event_location
Log a location event (highlights a single tile). I should remove this one as turfs does the same thing essentially
log_event_maptext
Log a maptext event (renders a floating text label at the turf when selected). text_string is the string to display at the turf.
log_event_path
Log a path event (renders directional arrows + start/end markers for a list of turfs in order from start to finish).
log_event_text
Log a plain text event. Has no world-visuals, just puts text into the menu
log_event_turfs
Log a turfs event (highlights a set of tiles).
on_pick_target_click
Signal handler: fired when the user clicks something while in pick-target mode.
toggle_pick_target
Enter pick-target mode: the next atom the user clicks gets DF_EVLOGGING set.
ui_assets
Tgui stuff below!!