mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
11 lines
5.1 KiB
HTML
11 lines
5.1 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/element - 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/element.html#var">Var Details</a> - <a href="datum/element.html#proc">Proc Details</a></header><main><h1>element <aside>/<a href="datum.html">datum</a>/<a href="datum/element.html">element</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L7"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 7"></a></h1><p>A holder for simple behaviour that can be attached to many different types</p>
|
|
<p>Only one element of each type is instanced during game init.
|
|
Otherwise acts basically like a lightweight component.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/element.html#var/argument_hash_end_idx">argument_hash_end_idx</a></th><td>The index of the last attach argument to consider for duplicate elements
|
|
Only used when <code>element_flags</code> contains <a href="code/__DEFINES/dcs/dcs_flags.html#define/ELEMENT_BESPOKE" title="ELEMENT_BESPOKE">ELEMENT_BESPOKE</a>.
|
|
If not set, it'll copy every argument from <code>argument_hash_start_idx</code> onwards as normal</td></tr><tr><th><a href="datum/element.html#var/argument_hash_start_idx">argument_hash_start_idx</a></th><td>The index of the first attach argument to consider for duplicate elements</td></tr><tr><th><a href="datum/element.html#var/element_flags">element_flags</a></th><td>Option flags for element behaviour</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/element.html#proc/Attach">Attach</a></th><td>Activates the functionality defined by the element on the given target datum</td></tr><tr><th><a href="datum/element.html#proc/Detach">Detach</a></th><td>Deactivates the functionality defines by the element on the given datum</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/argument_hash_end_idx"><aside class="declaration">var </aside>argument_hash_end_idx <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L27"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 27"></a></h3><p>The index of the last attach argument to consider for duplicate elements
|
|
Only used when <code>element_flags</code> contains <a href="code/__DEFINES/dcs/dcs_flags.html#define/ELEMENT_BESPOKE" title="ELEMENT_BESPOKE">ELEMENT_BESPOKE</a>.
|
|
If not set, it'll copy every argument from <code>argument_hash_start_idx</code> onwards as normal</p><h3 id="var/argument_hash_start_idx"><aside class="declaration">var </aside>argument_hash_start_idx <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L20"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 20"></a></h3><p>The index of the first attach argument to consider for duplicate elements</p>
|
|
<p>All arguments from this index onwards (1 based, until <code>argument_hash_end_idx</code> is reached, if set)
|
|
are hashed into the key to determine if this is a new unique element or one already exists</p>
|
|
<p>Is only used when flags contains <a href="code/__DEFINES/dcs/dcs_flags.html#define/ELEMENT_BESPOKE" title="ELEMENT_BESPOKE">ELEMENT_BESPOKE</a></p>
|
|
<p>This is infinity so you must explicitly set this</p><h3 id="var/element_flags"><aside class="declaration">var </aside>element_flags <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 9"></a></h3><p>Option flags for element behaviour</p><h2 id="proc">Proc Details</h2><h3 id="proc/Attach"><aside class="declaration">proc </aside>Attach<aside>(/<a href="datum.html">datum</a>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L30"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 30"></a></aside></h3><p>Activates the functionality defined by the element on the given target datum</p><h3 id="proc/Detach"><aside class="declaration">proc </aside>Detach<aside>(/<a href="datum.html">datum</a>/source, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L39"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 39"></a></aside></h3><p>Deactivates the functionality defines by the element on the given datum</p></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> |