30 lines
9.3 KiB
HTML
30 lines
9.3 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>code/__DEFINES/spaceman_dmm.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/__DEFINES/spaceman_dmm.html#define">Define Details</a></header><main><h1>code/__DEFINES/spaceman_dmm.dm <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm0"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm0"></a></h1><table class="summary" cellspacing="0"><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/RETURN_TYPE">RETURN_TYPE</a></th><td>Sets a return type expression for a proc. The return type can take the forms:</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/SHOULD_CALL_PARENT">SHOULD_CALL_PARENT</a></th><td>If set, will enable a diagnostic on children of the proc it is set on which do
|
|
not contain any <code>..()</code> parent calls. This can help with finding situations
|
|
where a signal or other important handling in the parent proc is being skipped.
|
|
Child procs may set this setting to <code>0</code> instead to override the check.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/SHOULD_NOT_OVERRIDE">SHOULD_NOT_OVERRIDE</a></th><td>If set, raise a warning for any child procs that override this one,
|
|
regardless of if it calls parent or not.
|
|
This functions in a similar way to the <code>final</code> keyword in some languages.
|
|
This cannot be disabled by child overrides.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/SHOULD_NOT_SLEEP">SHOULD_NOT_SLEEP</a></th><td>If set, raise a warning if the proc or one of the sub-procs it calls
|
|
uses a blocking call, such as <code>sleep()</code> or <code>input()</code> without using <code>set waitfor = 0</code>
|
|
This cannot be disabled by child overrides.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/SHOULD_BE_PURE">SHOULD_BE_PURE</a></th><td>If set, ensure a proc is 'pure', such that it does not make any changes
|
|
outside itself or output. This also checks to make sure anything using
|
|
this proc doesn't invoke it without making use of the return value.
|
|
This cannot be disabled by child overrides.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/PRIVATE_PROC">PRIVATE_PROC</a></th><td>Private procs can only be called by things of exactly the same type.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/PROTECTED_PROC">PROTECTED_PROC</a></th><td>Protected procs can only be call by things of the same type <em>or subtypes</em>.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/UNLINT">UNLINT</a></th><td>If set, will not lint.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/VAR_FINAL">VAR_FINAL</a></th><td>If set, overriding their value isn't permitted by types that inherit it.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/VAR_PRIVATE">VAR_PRIVATE</a></th><td>Private vars can only be called by things of exactly the same type.</td></tr><tr><th><a href="code/__DEFINES/spaceman_dmm.html#define/VAR_PROTECTED">VAR_PROTECTED</a></th><td>Protected vars can only be called by things of the same type <em>or subtypes</em>.</td></tr></table><h2 id="define">Define Details</h2><h3 id="define/PRIVATE_PROC"><aside class="declaration">#define </aside>PRIVATE_PROC<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L49"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 49"></a></h3><p>Private procs can only be called by things of exactly the same type.</p><h3 id="define/PROTECTED_PROC"><aside class="declaration">#define </aside>PROTECTED_PROC<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L51"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 51"></a></h3><p>Protected procs can only be call by things of the same type <em>or subtypes</em>.</p><h3 id="define/RETURN_TYPE"><aside class="declaration">#define </aside>RETURN_TYPE<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L20"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 20"></a></h3><p>Sets a return type expression for a proc. The return type can take the forms:</p>
|
|
<p><code>/typepath</code> - a raw typepath. The return type of the proc is the type named.</p>
|
|
<p><code>param</code> - a typepath given as a parameter, for procs which return an instance of the passed-in type.</p>
|
|
<p><code>param.type</code> - the static type of a passed-in parameter, for procs which
|
|
return their input or otherwise another value of the same type.</p>
|
|
<p><code>param[_].type</code> - the static type of a passed-in parameter, with one level
|
|
of <code>/list</code> stripped, for procs which select one item from a list. The <code>[_]</code>
|
|
may be repeated to strip more levels of <code>/list</code>.</p><h3 id="define/SHOULD_BE_PURE"><aside class="declaration">#define </aside>SHOULD_BE_PURE<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L47"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 47"></a></h3><p>If set, ensure a proc is 'pure', such that it does not make any changes
|
|
outside itself or output. This also checks to make sure anything using
|
|
this proc doesn't invoke it without making use of the return value.
|
|
This cannot be disabled by child overrides.</p><h3 id="define/SHOULD_CALL_PARENT"><aside class="declaration">#define </aside>SHOULD_CALL_PARENT<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L27"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 27"></a></h3><p>If set, will enable a diagnostic on children of the proc it is set on which do
|
|
not contain any <code>..()</code> parent calls. This can help with finding situations
|
|
where a signal or other important handling in the parent proc is being skipped.
|
|
Child procs may set this setting to <code>0</code> instead to override the check.</p><h3 id="define/SHOULD_NOT_OVERRIDE"><aside class="declaration">#define </aside>SHOULD_NOT_OVERRIDE<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L34"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 34"></a></h3><p>If set, raise a warning for any child procs that override this one,
|
|
regardless of if it calls parent or not.
|
|
This functions in a similar way to the <code>final</code> keyword in some languages.
|
|
This cannot be disabled by child overrides.</p><h3 id="define/SHOULD_NOT_SLEEP"><aside class="declaration">#define </aside>SHOULD_NOT_SLEEP<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L40"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 40"></a></h3><p>If set, raise a warning if the proc or one of the sub-procs it calls
|
|
uses a blocking call, such as <code>sleep()</code> or <code>input()</code> without using <code>set waitfor = 0</code>
|
|
This cannot be disabled by child overrides.</p><h3 id="define/UNLINT"><aside class="declaration">#define </aside>UNLINT<aside>(X)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L53"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 53"></a></h3><p>If set, will not lint.</p><h3 id="define/VAR_FINAL"><aside class="declaration">#define </aside>VAR_FINAL <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L56"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 56"></a></h3><p>If set, overriding their value isn't permitted by types that inherit it.</p><h3 id="define/VAR_PRIVATE"><aside class="declaration">#define </aside>VAR_PRIVATE <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L58"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 58"></a></h3><p>Private vars can only be called by things of exactly the same type.</p><h3 id="define/VAR_PROTECTED"><aside class="declaration">#define </aside>VAR_PROTECTED <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/spaceman_dmm.dm#L60"><img src="git.png" width="16" height="16" title="code/__DEFINES/spaceman_dmm.dm 60"></a></h3><p>Protected vars can only be called by things of the same type <em>or subtypes</em>.</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> |