mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
13 lines
8.2 KiB
HTML
13 lines
8.2 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/scope - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="datum/component/scope.html#var">Var Details</a> - <a href="datum/component/scope.html#proc">Proc Details</a></header><main><h1>scope <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/scope.html">scope</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L2"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 2"></a></h1><p>A component that allows players to use the item to zoom out. Mainly intended for firearms, but now works with other items too.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/scope.html#var/flags">flags</a></th><td>Flags for scoping. Check <code>code\__DEFINES\flags.dm</code></td></tr><tr><th><a href="datum/component/scope.html#var/item_action_type">item_action_type</a></th><td>if not null, an item action will be added. Redundant if the mode is ZOOM_METHOD_RIGHT_CLICK or ZOOM_METHOD_WIELD.</td></tr><tr><th><a href="datum/component/scope.html#var/range_modifier">range_modifier</a></th><td>How far the view can be moved from the player. At 1, it can be moved by the player's view distance; other values scale linearly.</td></tr><tr><th><a href="datum/component/scope.html#var/time_to_scope">time_to_scope</a></th><td>Time to scope up, if you want the scope to take time to boot up. Used by the LWAP</td></tr><tr><th><a href="datum/component/scope.html#var/tracker">tracker</a></th><td>Fullscreen object we use for tracking.</td></tr><tr><th><a href="datum/component/scope.html#var/tracker_owner_ckey">tracker_owner_ckey</a></th><td>The owner of the tracker's ckey. For comparing with the current owner mob, in case the client has left it (e.g. ghosted).</td></tr><tr><th><a href="datum/component/scope.html#var/trait_to_add">trait_to_add</a></th><td>A trait you want to add when scoped in to the mob.</td></tr><tr><th><a href="datum/component/scope.html#var/zoom_method">zoom_method</a></th><td>The method which we zoom in and out</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/scope.html#proc/get_target">get_target</a></th><td>We find and return the best target to hit on a given turf.</td></tr><tr><th><a href="datum/component/scope.html#proc/stop_zooming">stop_zooming</a></th><td>We stop zooming, canceling processing, resetting stuff back to normal and deleting our tracker.</td></tr><tr><th><a href="datum/component/scope.html#proc/zoom">zoom</a></th><td>We start zooming by adding our tracker overlay and starting our processing.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/flags"><aside class="declaration">var </aside>flags <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 16"></a></h3><p>Flags for scoping. Check <code>code\__DEFINES\flags.dm</code></p><h3 id="var/item_action_type"><aside class="declaration">var </aside>item_action_type <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 12"></a></h3><p>if not null, an item action will be added. Redundant if the mode is ZOOM_METHOD_RIGHT_CLICK or ZOOM_METHOD_WIELD.</p><h3 id="var/range_modifier"><aside class="declaration">var </aside>range_modifier <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L4"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 4"></a></h3><p>How far the view can be moved from the player. At 1, it can be moved by the player's view distance; other values scale linearly.</p><h3 id="var/time_to_scope"><aside class="declaration">var </aside>time_to_scope <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 14"></a></h3><p>Time to scope up, if you want the scope to take time to boot up. Used by the LWAP</p><h3 id="var/tracker"><aside class="declaration">var </aside>tracker <aside>– /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/fullscreen/stretch/cursor_catcher.html">fullscreen/stretch/cursor_catcher</a>/<a href="atom/movable/screen/fullscreen/stretch/cursor_catcher/scope.html">scope</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L6"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 6"></a></h3><p>Fullscreen object we use for tracking.</p><h3 id="var/tracker_owner_ckey"><aside class="declaration">var </aside>tracker_owner_ckey <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L8"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 8"></a></h3><p>The owner of the tracker's ckey. For comparing with the current owner mob, in case the client has left it (e.g. ghosted).</p><h3 id="var/trait_to_add"><aside class="declaration">var </aside>trait_to_add <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 18"></a></h3><p>A trait you want to add when scoped in to the mob.</p><h3 id="var/zoom_method"><aside class="declaration">var </aside>zoom_method <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L10"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 10"></a></h3><p>The method which we zoom in and out</p><h2 id="proc">Proc Details</h2><h3 id="proc/get_target"><aside class="declaration">proc </aside>get_target<aside>(/<a href="turf.html">turf</a>/target_turf) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L136"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 136"></a></aside></h3><p>We find and return the best target to hit on a given turf.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>target_turf: The turf we are looking for targets on.</li>
|
||
</ul><h3 id="proc/stop_zooming"><aside class="declaration">proc </aside>stop_zooming<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L223"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 223"></a></aside></h3><p>We stop zooming, canceling processing, resetting stuff back to normal and deleting our tracker.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user: The mob we are canceling zooming on.</li>
|
||
</ul><h3 id="proc/zoom"><aside class="declaration">proc </aside>zoom<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/scope.dm#L165"><img src="git.png" width="16" height="16" title="code/datums/components/scope.dm 165"></a></aside></h3><p>We start zooming by adding our tracker overlay and starting our processing.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>user: The mob we are starting zooming on.</li>
|
||
</ul></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |