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

32 lines
6.2 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>/obj/machinery/power/apc - /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="obj/machinery/power/apc.html#var">Var Details</a> - <a href="obj/machinery/power/apc.html#proc">Proc Details</a></header><main><h1>apc <aside>/<a href="obj.html">obj</a>/<a href="obj/machinery.html">machinery</a>/<a href="obj/machinery/power/apc.html">power/apc</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/power/apc.dm#L110"><img src="git.png" width="16" height="16" title="code/modules/power/apc.dm 110"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/machinery/power/apc.html#var/alarm_manager">alarm_manager</a></th><td>Represents a signel source of power alarms for this apc</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/machinery/power/apc.html#proc/autoset">autoset</a></th><td>Returns the new status value for an APC channel.</td></tr><tr><th><a href="obj/machinery/power/apc.html#proc/check_updates">check_updates</a></th><td>Checks for what icon updates we will need to handle</td></tr><tr><th><a href="obj/machinery/power/apc.html#proc/setsubsystem">setsubsystem</a></th><td>Used by external forces to set the APCs channel status's.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/alarm_manager"><aside class="declaration">var </aside>alarm_manager <aside> /<a href="datum.html">datum</a>/<a href="datum/alarm_handler.html">alarm_handler</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/power/apc.dm#L174"><img src="git.png" width="16" height="16" title="code/modules/power/apc.dm 174"></a></h3><p>Represents a signel source of power alarms for this apc</p><h2 id="proc">Proc Details</h2><h3 id="proc/autoset"><aside class="declaration">proc </aside>autoset<aside>(val, on) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/power/apc.dm#L1529"><img src="git.png" width="16" height="16" title="code/modules/power/apc.dm 1529"></a></aside></h3><p>Returns the new status value for an APC channel.</p>
<p>// val 0=off, 1=off(auto) 2=on 3=on(auto)
// on 0=off, 1=on, 2=autooff
TODO: Make this use bitflags instead. It should take at most three lines, but it's out of scope for now.</p>
<p>Arguments:</p>
<ul>
<li>val: The current status of the power channel.
<ul>
<li><a href="code/modules/power/apc.html#define/APC_CHANNEL_OFF" title="APC_CHANNEL_OFF">APC_CHANNEL_OFF</a>: The APCs channel has been manually set to off. This channel will not automatically change.</li>
<li><a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_OFF" title="APC_CHANNEL_AUTO_OFF">APC_CHANNEL_AUTO_OFF</a>: The APCs channel is running on automatic and is currently off. Can be automatically set to <a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_ON" title="APC_CHANNEL_AUTO_ON">APC_CHANNEL_AUTO_ON</a>.</li>
<li><a href="code/modules/power/apc.html#define/APC_CHANNEL_ON" title="APC_CHANNEL_ON">APC_CHANNEL_ON</a>: The APCs channel has been manually set to on. This will be automatically changed only if the APC runs completely out of power or is disabled.</li>
<li><a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_ON" title="APC_CHANNEL_AUTO_ON">APC_CHANNEL_AUTO_ON</a>: The APCs channel is running on automatic and is currently on. Can be automatically set to <a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_OFF" title="APC_CHANNEL_AUTO_OFF">APC_CHANNEL_AUTO_OFF</a>.</li>
</ul>
</li>
<li>on: An enum dictating how to change the channel's status.
<ul>
<li><a href="code/modules/power/apc.html#define/AUTOSET_FORCE_OFF" title="AUTOSET_FORCE_OFF">AUTOSET_FORCE_OFF</a>: The APC forces the channel to turn off. This includes manually set channels.</li>
<li><a href="code/modules/power/apc.html#define/AUTOSET_ON" title="AUTOSET_ON">AUTOSET_ON</a>: The APC allows automatic channels to turn back on.</li>
<li><a href="code/modules/power/apc.html#define/AUTOSET_OFF" title="AUTOSET_OFF">AUTOSET_OFF</a>: The APC turns automatic channels off.</li>
</ul>
</li>
</ul><h3 id="proc/check_updates"><aside class="declaration">proc </aside>check_updates<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/power/apc.dm#L440"><img src="git.png" width="16" height="16" title="code/modules/power/apc.dm 440"></a></aside></h3><p>Checks for what icon updates we will need to handle</p><h3 id="proc/setsubsystem"><aside class="declaration">proc </aside>setsubsystem<aside>(val) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/power/apc.dm#L1552"><img src="git.png" width="16" height="16" title="code/modules/power/apc.dm 1552"></a></aside></h3><p>Used by external forces to set the APCs channel status's.</p>
<p>Arguments:</p>
<ul>
<li>val: The desired value of the subsystem:
<ul>
<li>1: Manually sets the APCs channel to be <a href="code/modules/power/apc.html#define/APC_CHANNEL_OFF" title="APC_CHANNEL_OFF">APC_CHANNEL_OFF</a>.</li>
<li>2: Manually sets the APCs channel to be <a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_ON" title="APC_CHANNEL_AUTO_ON">APC_CHANNEL_AUTO_ON</a>. If the APC doesn't have any power this defaults to <a href="code/modules/power/apc.html#define/APC_CHANNEL_OFF" title="APC_CHANNEL_OFF">APC_CHANNEL_OFF</a> instead.</li>
<li>3: Sets the APCs channel to be <a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_ON" title="APC_CHANNEL_AUTO_ON">APC_CHANNEL_AUTO_ON</a>. If the APC doesn't have enough power this defaults to <a href="code/modules/power/apc.html#define/APC_CHANNEL_AUTO_OFF" title="APC_CHANNEL_AUTO_OFF">APC_CHANNEL_AUTO_OFF</a> instead.</li>
</ul>
</li>
</ul></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>