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

lock_on_cursor

Lock on Cursor component

Finds the nearest targets to your cursor and passes them into a callback, also drawing an icon on top of them.

Vars

can_target_callbackCallback to call in order to validate a potential target
current_ranging_idRanging ID for some kind of tick check safety calculation
immune_weakrefsCache of weakrefs to ignore targeting formatted as list(weakref = TRUE)
lock_amountNumber of things we can target at once
lock_appearanceAppearance to overlay onto whatever we are targeting
lock_cursor_rangeRange to search for targets from the cursor position
lock_imagesCurrent images we are displaying to the client
locked_weakrefsWeakrefs to current locked targets
mouse_trackerFull screen overlay which is used to track mouse position
on_lockCallback to call when we have decided on our targets, is passed the list of final targets
target_typecacheTypecache of things we are allowed to target

Procs

can_targetReturns true if target is a valid target
clear_invalid_targetsRemoves targets which are out of range or don't exist any more
clear_visualsRemoves target overlays
find_targetsReplace our targets with new ones
get_nearestReturns the nearest targets to the current cursor position
refresh_visualsReset the overlays on all targets
show_visualsAdds overlays to all targets

Var Details

can_target_callback

Callback to call in order to validate a potential target

current_ranging_id

Ranging ID for some kind of tick check safety calculation

immune_weakrefs

Cache of weakrefs to ignore targeting formatted as list(weakref = TRUE)

lock_amount

Number of things we can target at once

lock_appearance

Appearance to overlay onto whatever we are targeting

lock_cursor_range

Range to search for targets from the cursor position

lock_images

Current images we are displaying to the client

locked_weakrefs

Weakrefs to current locked targets

mouse_tracker

Full screen overlay which is used to track mouse position

on_lock

Callback to call when we have decided on our targets, is passed the list of final targets

target_typecache

Typecache of things we are allowed to target

Proc Details

can_target

Returns true if target is a valid target

clear_invalid_targets

Removes targets which are out of range or don't exist any more

clear_visuals

Removes target overlays

find_targets

Replace our targets with new ones

get_nearest

Returns the nearest targets to the current cursor position

refresh_visuals

Reset the overlays on all targets

show_visuals

Adds overlays to all targets