Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/computer_file/program/radar

this is a copy of something that is already in the database- it should not be able to be saved.

Vars

arrowstyleUsed by the tgui interface, themed NT or Syndicate.
last_icon_stateUsed to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance(UPDATE_ICON) calls
next_scanUsed to store when the next scan is available. Updated by the scan() proc.
objectsList of trackable entities. Updated by the scan() proc.
pointercolorUsed by the tgui interface, themed for NT or Syndicate colors.
selectedRef of the last trackable object selected by the user in the tgui window. Updated in the ui_act() proc.

Procs

find_atomFinds the atom in the appropriate list that the selected var indicates
scanRuns a scan of all the trackable atoms.
trackUpdates tracking information of the selected target.
trackableChecks the trackability of the selected target.

Var Details

arrowstyle

Used by the tgui interface, themed NT or Syndicate.

last_icon_state

Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance(UPDATE_ICON) calls

next_scan

Used to store when the next scan is available. Updated by the scan() proc.

objects

List of trackable entities. Updated by the scan() proc.

pointercolor

Used by the tgui interface, themed for NT or Syndicate colors.

selected

Ref of the last trackable object selected by the user in the tgui window. Updated in the ui_act() proc.

Proc Details

find_atom

Finds the atom in the appropriate list that the selected var indicates

The selected var holds a REF, which is a string. A mob REF may be something like "mob_209". In order to find the actual atom, we need to search the appropriate list for the REF string. This is dependant on the program (Lifeline uses GLOB.human_list, while Fission360 uses GLOB.poi_list), but the result will be the same; evaluate the string and return an atom reference.

scan

Runs a scan of all the trackable atoms.

Checks each entry in the GLOB of the specific trackable atoms against the track() proc, and fill the objects list with lists containing the atoms' names and REFs. The objects list is handed to the tgui screen for displaying to, and being selected by, the user. A two second sleep is used to delay the scan, both for thematical reasons as well as to limit the load players may place on the server using these somewhat costly loops.

track

Updates tracking information of the selected target.

The track() proc updates the entire set of information about the location of the target, including whether the Ntos window should use a pinpointer crosshair over the up/down arrows, or none in favor of a rotating arrow for far away targets. This information is returned in the form of a list.

trackable

Checks the trackability of the selected target.

If the target is on the computer's Z level, or both are on station Z levels, and the target isn't untrackable, return TRUE. Arguments: *arg1 is the atom being evaluated.