Files
GS13NG/code/datums/components/field_of_vision.html
2025-02-05 06:19:18 +00:00

8 lines
2.6 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>code/datums/components/field_of_vision.dm - /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="code/datums/components/field_of_vision.html#define">Define Details</a></header><main><h1>code/datums/components/field_of_vision.dm <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/field_of_vision.dm0"><img src="git.png" width="16" height="16" title="code/datums/components/field_of_vision.dm0"></a></h1><table class="summary" cellspacing="0"><tr><th><a href="datum/component/field_of_vision.html">/datum/component/field_of_vision</a></th><td>Field of Vision component. Does totally what you probably think it does,
ergo preventing players from seeing what's behind them.</td></tr><tr><th><a href="code/datums/components/field_of_vision.html#define/FOV_ANGLE_CHECK">FOV_ANGLE_CHECK</a></th><td>Byond doc is not entirely correct on the integrated arctan() proc.
When both x and y are negative, the output is also negative, cycling clockwise instead of counter-clockwise.
That's also why I am extensively using the SIMPLIFY_DEGREES macro here.</td></tr><tr><th><a href="atom/movable/fov_holder.html">/atom/movable/fov_holder</a></th><td>The shadow cone's mask and visual images holder which can't locate inside the mob,
lest they inherit the mob opacity and cause a lot of hindrance</td></tr></table><h2 id="define">Define Details</h2><h3 id="define/FOV_ANGLE_CHECK"><aside class="declaration">#define </aside>FOV_ANGLE_CHECK<aside>(mob, target, zero_x_y_statement, success_statement)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/field_of_vision.dm#L260"><img src="git.png" width="16" height="16" title="code/datums/components/field_of_vision.dm 260"></a></h3><p>Byond doc is not entirely correct on the integrated arctan() proc.
When both x and y are negative, the output is also negative, cycling clockwise instead of counter-clockwise.
That's also why I am extensively using the SIMPLIFY_DEGREES macro here.</p>
<p>Overall this is the main macro that calculates wheter a target is within the shadow cone angle or not.</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>