Files
2025-02-05 06:19:18 +00:00

22 lines
8.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/computer_file/program/radar - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/computer_file/program/radar.html#var">Var Details</a> - <a href="datum/computer_file/program/radar.html#proc">Proc Details</a></header><main><h1>radar <aside>/<a href="datum.html">datum</a>/<a href="datum/computer_file/program.html">computer_file/program</a>/<a href="datum/computer_file/program/radar.html">radar</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L1"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 1"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/computer_file/program/radar.html#var/arrowstyle">arrowstyle</a></th><td>Used by the tgui interface, themed NT or Syndicate.</td></tr><tr><th><a href="datum/computer_file/program/radar.html#var/last_icon_state">last_icon_state</a></th><td>Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance() calls</td></tr><tr><th><a href="datum/computer_file/program/radar.html#var/next_scan">next_scan</a></th><td>Used to store when the next scan is available. Updated by the scan() proc.</td></tr><tr><th><a href="datum/computer_file/program/radar.html#var/objects">objects</a></th><td>List of trackable entities. Updated by the scan() proc.</td></tr><tr><th><a href="datum/computer_file/program/radar.html#var/pointercolor">pointercolor</a></th><td>Used by the tgui interface, themed for NT or Syndicate colors.</td></tr><tr><th><a href="datum/computer_file/program/radar.html#var/selected">selected</a></th><td>Ref of the last trackable object selected by the user in the tgui window. Updated in the ui_act() proc.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/computer_file/program/radar.html#proc/find_atom">find_atom</a></th><td>Finds the atom in the appropriate list that the <code>selected</code> var indicates</td></tr><tr><th><a href="datum/computer_file/program/radar.html#proc/scan">scan</a></th><td>Runs a scan of all the trackable atoms.</td></tr><tr><th><a href="datum/computer_file/program/radar.html#proc/track">track</a></th><td>Updates tracking information of the selected target.</td></tr><tr><th><a href="datum/computer_file/program/radar.html#proc/trackable">trackable</a></th><td>Checks the trackability of the selected target.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/arrowstyle"><aside class="declaration">var </aside>arrowstyle <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L22"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 22"></a></h3><p>Used by the tgui interface, themed NT or Syndicate.</p><h3 id="var/last_icon_state"><aside class="declaration">var </aside>last_icon_state <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L20"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 20"></a></h3><p>Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance() calls</p><h3 id="var/next_scan"><aside class="declaration">var </aside>next_scan <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L18"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 18"></a></h3><p>Used to store when the next scan is available. Updated by the scan() proc.</p><h3 id="var/objects"><aside class="declaration">var </aside>objects <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L14"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 14"></a></h3><p>List of trackable entities. Updated by the scan() proc.</p><h3 id="var/pointercolor"><aside class="declaration">var </aside>pointercolor <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L24"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 24"></a></h3><p>Used by the tgui interface, themed for NT or Syndicate colors.</p><h3 id="var/selected"><aside class="declaration">var </aside>selected <aside> /<a href="atom.html">atom</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L16"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 16"></a></h3><p>Ref of the last trackable object selected by the user in the tgui window. Updated in the ui_act() proc.</p><h2 id="proc">Proc Details</h2><h3 id="proc/find_atom"><aside class="declaration">proc </aside>find_atom<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L163"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 163"></a></aside></h3><p>Finds the atom in the appropriate list that the <code>selected</code> var indicates</p>
<p>The <code>selected</code> var holds a REF, which is a string. A mob REF may be
something like &quot;mob_209&quot;. 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.</p><h3 id="proc/scan"><aside class="declaration">proc </aside>scan<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L149"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 149"></a></aside></h3><p>Runs a scan of all the trackable atoms.</p>
<p>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.</p><h3 id="proc/track"><aside class="declaration">proc </aside>track<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L86"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 86"></a></aside></h3><p>Updates tracking information of the selected target.</p>
<p>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.</p><h3 id="proc/trackable"><aside class="declaration">proc </aside>trackable<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/signal) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/modular_computers/file_system/programs/radar.dm#L128"><img src="git.png" width="16" height="16" title="code/modules/modular_computers/file_system/programs/radar.dm 128"></a></aside></h3><p>Checks the trackability of the selected target.</p>
<p>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.</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>