5 lines
4.6 KiB
HTML
5 lines
4.6 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/alarm_handler - /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/alarm_handler.html#var">Var Details</a> - <a href="datum/alarm_handler.html#proc">Proc Details</a></header><main><h1>alarm_handler <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/datums/alarm.dm#L15"><img src="git.png" width="16" height="16" title="code/datums/alarm.dm 15"></a></h1><p>Represents a single source of alarms, one alarm handler will only ever count for one alarm per listener</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/alarm_handler.html#var/sent_alarms">sent_alarms</a></th><td>A list of alarm type -> list of areas we currently have alarms in</td></tr><tr><th><a href="datum/alarm_handler.html#var/source_atom">source_atom</a></th><td>Our source atom</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/alarm_handler.html#proc/clear_alarm">clear_alarm</a></th><td>Clears an alarm from any interested listeners</td></tr><tr><th><a href="datum/alarm_handler.html#proc/clear_alarm_from_area">clear_alarm_from_area</a></th><td>Exists so we can request that the alarms from an area are cleared, even if our source atom is no longer in that area</td></tr><tr><th><a href="datum/alarm_handler.html#proc/send_alarm">send_alarm</a></th><td>Sends an alarm to any interested things, does some checks to prevent unneeded work
|
||
Important to note is that source_atom is not held as a ref, we're used as a proxy to prevent hard deletes
|
||
optional_camera should only be used when you have one camera you want to pass along to alarm listeners, most of the time you should have no use for it</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/sent_alarms"><aside class="declaration">var </aside>sent_alarms <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/alarm.dm#L17"><img src="git.png" width="16" height="16" title="code/datums/alarm.dm 17"></a></h3><p>A list of alarm type -> list of areas we currently have alarms in</p><h3 id="var/source_atom"><aside class="declaration">var </aside>source_atom <aside>– /<a href="atom.html">atom</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/alarm.dm#L21"><img src="git.png" width="16" height="16" title="code/datums/alarm.dm 21"></a></h3><p>Our source atom</p><h2 id="proc">Proc Details</h2><h3 id="proc/clear_alarm"><aside class="declaration">proc </aside>clear_alarm<aside>(alarm_type, use_as_source_atom) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/alarm.dm#L69"><img src="git.png" width="16" height="16" title="code/datums/alarm.dm 69"></a></aside></h3><p>Clears an alarm from any interested listeners</p><h3 id="proc/clear_alarm_from_area"><aside class="declaration">proc </aside>clear_alarm_from_area<aside>(alarm_type, /<a href="area.html">area</a>/our_area) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/alarm.dm#L79"><img src="git.png" width="16" height="16" title="code/datums/alarm.dm 79"></a></aside></h3><p>Exists so we can request that the alarms from an area are cleared, even if our source atom is no longer in that area</p><h3 id="proc/send_alarm"><aside class="declaration">proc </aside>send_alarm<aside>(alarm_type, /<a href="atom.html">atom</a>/use_as_source_atom, optional_camera) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/alarm.dm#L40"><img src="git.png" width="16" height="16" title="code/datums/alarm.dm 40"></a></aside></h3><p>Sends an alarm to any interested things, does some checks to prevent unneeded work
|
||
Important to note is that source_atom is not held as a ref, we're used as a proxy to prevent hard deletes
|
||
optional_camera should only be used when you have one camera you want to pass along to alarm listeners, most of the time you should have no use for it</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> |