mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
17 lines
5.6 KiB
HTML
17 lines
5.6 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/label - 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/component/label.html#var">Var Details</a> - <a href="datum/component/label.html#proc">Proc Details</a></header><main><h1>label <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/label.html">label</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/label.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/components/label.dm 12"></a></h1><p>The label component.</p>
|
|
<p>This component is used to manage labels applied by the hand labeler.</p>
|
|
<p>Atoms can only have one instance of this component, and therefore only one label at a time.
|
|
This is to avoid having names like "Backpack (label1) (label2) (label3)". This is annoying and abnoxious to read.</p>
|
|
<p>When a player clicks the atom with a hand labeler to apply a label, this component gets applied to it.
|
|
If the labeler is off, the component will be removed from it, and the label will be removed from its name.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/label.html#var/label_name">label_name</a></th><td>The name of the label the player is applying to the parent.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/label.html#proc/InheritComponent">InheritComponent</a></th><td>This proc will fire after the parent is hit by a hand labeler which is trying to apply another label.
|
|
Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.</td></tr><tr><th><a href="datum/component/label.html#proc/apply_label">apply_label</a></th><td>Applies a label to the name of the parent in the format of: "parent_name (label)"</td></tr><tr><th><a href="datum/component/label.html#proc/on_update_name">on_update_name</a></th><td>This proc will trigger when someone examines the parent.
|
|
It will attach the text found in the body of the proc to the <code>examine_list</code> and display it to the player examining the parent.</td></tr><tr><th><a href="datum/component/label.html#proc/remove_label">remove_label</a></th><td>Removes the label from the parent's name</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/label_name"><aside class="declaration">var </aside>label_name <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/label.dm#L15"><img src="git.png" width="16" height="16" title="code/datums/components/label.dm 15"></a></h3><p>The name of the label the player is applying to the parent.</p><h2 id="proc">Proc Details</h2><h3 id="proc/InheritComponent"><aside class="parent"><a title="/datum/component" href="datum/component.html#proc/InheritComponent">↑</a></aside>InheritComponent<aside>(/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/label.html">label</a>/new_comp, i_am_original, _label_name) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/label.dm#L36"><img src="git.png" width="16" height="16" title="code/datums/components/label.dm 36"></a></aside></h3><p>This proc will fire after the parent is hit by a hand labeler which is trying to apply another label.
|
|
Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.</p><h3 id="proc/apply_label"><aside class="declaration">proc </aside>apply_label<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/label.dm#L69"><img src="git.png" width="16" height="16" title="code/datums/components/label.dm 69"></a></aside></h3><p>Applies a label to the name of the parent in the format of: "parent_name (label)"</p><h3 id="proc/on_update_name"><aside class="declaration">proc </aside>on_update_name<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/label.dm#L60"><img src="git.png" width="16" height="16" title="code/datums/components/label.dm 60"></a></aside></h3><p>This proc will trigger when someone examines the parent.
|
|
It will attach the text found in the body of the proc to the <code>examine_list</code> and display it to the player examining the parent.</p>
|
|
<p>Arguments:</p>
|
|
<ul>
|
|
<li>source: The parent.</li>
|
|
<li>user: The mob exmaining the parent.</li>
|
|
<li>examine_list: The current list of text getting passed from the parent's normal examine() proc.
|
|
Reapplies label when update_name is called on the parent object. Attempts to remove it first just in case.</li>
|
|
</ul><h3 id="proc/remove_label"><aside class="declaration">proc </aside>remove_label<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/label.dm#L75"><img src="git.png" width="16" height="16" title="code/datums/components/label.dm 75"></a></aside></h3><p>Removes the label from the parent's name</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> |