mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
226 lines
50 KiB
HTML
226 lines
50 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><link rel="stylesheet" href="dmdoc.css"><title>/datum - 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.html#var">Var Details</a> - <a href="datum.html#proc">Proc Details</a></header><main><h1>datum <aside>/<a href="datum.html">datum</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datum.dm#L1"><img src="git.png" width="16" height="16" title="code/datums/datum.dm 1"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum.html#var/cached_ref">cached_ref</a></th><td>A cached version of our \ref
|
||
The brunt of \ref costs are in creating entries in the string tree (a tree of immutable strings)
|
||
This avoids doing that more then once per datum by ensuring ref strings always have a reference to them after they're first pulled</td></tr><tr><th><a href="datum.html#var/isprocessing">isprocessing</a></th><td>Used by SSprocessing</td></tr><tr><th><a href="datum.html#var/md5_unique_datum_id">md5_unique_datum_id</a></th><td>MD5'd version of the UID. Used for instances where we dont want to make clients aware of UIDs.</td></tr><tr><th><a href="datum.html#var/status_traits">status_traits</a></th><td>Status traits attached to this datum</td></tr><tr><th><a href="datum.html#var/tgui_shared_states">tgui_shared_states</a></th><td>global</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum.html#proc/CanProcCall">CanProcCall</a></th><td>Proc to check if a datum allows proc calls on it</td></tr><tr><th><a href="datum.html#proc/DeleteComponent">DeleteComponent</a></th><td>Removes the component from the datum</td></tr><tr><th><a href="datum.html#proc/DeleteComponentsType">DeleteComponentsType</a></th><td>Removes all components of a given type from the datum</td></tr><tr><th><a href="datum.html#proc/GetComponent">GetComponent</a></th><td>Return any component assigned to this datum of the given type</td></tr><tr><th><a href="datum.html#proc/GetComponents">GetComponents</a></th><td>Get all components of a given type that are attached to this datum</td></tr><tr><th><a href="datum.html#proc/GetExactComponent">GetExactComponent</a></th><td>Return any component assigned to this datum of the exact given type</td></tr><tr><th><a href="datum.html#proc/LoadComponent">LoadComponent</a></th><td>Get existing component of type, or create it and return a reference to it</td></tr><tr><th><a href="datum.html#proc/MD5_UID">MD5_UID</a></th><td>Safety wrapper for getting MD5 UIDs</td></tr><tr><th><a href="datum.html#proc/RegisterSignal">RegisterSignal</a></th><td>Register to listen for a signal from the passed in target</td></tr><tr><th><a href="datum.html#proc/RegisterSignals">RegisterSignals</a></th><td>Registers multiple signals to the same proc.</td></tr><tr><th><a href="datum.html#proc/TakeComponent">TakeComponent</a></th><td>Transfer this component to another parent</td></tr><tr><th><a href="datum.html#proc/TransferComponent">TransferComponent</a></th><td>Transfer a single component from the source datum, to the target.</td></tr><tr><th><a href="datum.html#proc/TransferComponents">TransferComponents</a></th><td>Transfer all components to target</td></tr><tr><th><a href="datum.html#proc/UID">UID</a></th><td>Gets or creates the UID of a datum</td></tr><tr><th><a href="datum.html#proc/UnregisterSignal">UnregisterSignal</a></th><td>Stop listening to a given signal from target</td></tr><tr><th><a href="datum.html#proc/_AddComponent">_AddComponent</a></th><td>Creates an instance of <code>new_type</code> in the datum and attaches to it as parent</td></tr><tr><th><a href="datum.html#proc/_AddElement">_AddElement</a></th><td>Finds the singleton for the element type given and attaches it to src</td></tr><tr><th><a href="datum.html#proc/_RemoveElement">_RemoveElement</a></th><td>Finds the singleton for the element type given and detaches it from src
|
||
You only need additional arguments beyond the type if you're using <a href="code/__DEFINES/dcs/dcs_flags.html#define/ELEMENT_BESPOKE" title="ELEMENT_BESPOKE">ELEMENT_BESPOKE</a></td></tr><tr><th><a href="datum.html#proc/_SendSignal">_SendSignal</a></th><td>Internal proc to handle most all of the signaling procedure</td></tr><tr><th><a href="datum.html#proc/_clear_signal_refs">_clear_signal_refs</a></th><td>Do not override this. This proc exists solely to be overriden by /turf. This
|
||
allows it to ignore clearing out signals which refer to it, in order to keep
|
||
those signals valid after the turf has been changed.</td></tr><tr><th><a href="datum.html#proc/add_traits">add_traits</a></th><td>Proc that handles adding multiple traits to a target via a list. Must have a common source and target.</td></tr><tr><th><a href="datum.html#proc/p_a">p_a</a></th><td>Functionally the \a macro, for the cases where you put a bicon between "some [bicon] pop corn"</td></tr><tr><th><a href="datum.html#proc/p_are">p_are</a></th><td>Applies "is" for singular genders, or "are" for plural ones (e.g. "he is here" Vs. "they are here").</td></tr><tr><th><a href="datum.html#proc/p_do">p_do</a></th><td>Applies "does" for singular genders, or "do" for plural ones (e.g. "she does stuff" Vs. "they do stuff").</td></tr><tr><th><a href="datum.html#proc/p_es">p_es</a></th><td>Adds an "es" to the end of a word as appropriate for a particular gender (e.g. "he screeches" and "they screech"). For verb conjugation.</td></tr><tr><th><a href="datum.html#proc/p_have">p_have</a></th><td>Applies "has" for singular genders, or "have" for plural ones (e.g. "she has eaten" Vs. "they have eaten").</td></tr><tr><th><a href="datum.html#proc/p_s">p_s</a></th><td>Used to add an "s" to the end of a word as appropriate for a particular gender (e.g. "she looks" and "they look"). For verb conjugation.</td></tr><tr><th><a href="datum.html#proc/p_their">p_their</a></th><td>Applies one of "their", "its", "his", or "her" as appropriate. Set to TRUE to capitalise.</td></tr><tr><th><a href="datum.html#proc/p_them">p_them</a></th><td>Applies one of "them", "it", "him", or "her" as appropriate. Set to TRUE to capitalise.</td></tr><tr><th><a href="datum.html#proc/p_themselves">p_themselves</a></th><td>Applies one of "themselves", "itself", "himself", or "herself" as appropriate. Set to TRUE to capitalise.</td></tr><tr><th><a href="datum.html#proc/p_they">p_they</a></th><td>Applies one of "they", "it", "he", or "she" as appropriate. Set to TRUE to capitalise.</td></tr><tr><th><a href="datum.html#proc/p_theyre">p_theyre</a></th><td>Applies one of "they're", "it's", "he's", or "she's" as appropriate. Set to TRUE to capitalise.</td></tr><tr><th><a href="datum.html#proc/p_theyve">p_theyve</a></th><td>Applies one of "they've", "it's", "he's", or "she's" as appropriate. Set to TRUE to capitalise.</td></tr><tr><th><a href="datum.html#proc/p_were">p_were</a></th><td>Applies "was" for singular genders, or "were" for plural ones (e.g. "it was huge" Vs. "they were huge").</td></tr><tr><th><a href="datum.html#proc/remove_traits">remove_traits</a></th><td>Proc that handles removing multiple traits from a target via a list. Must have a common source and target.</td></tr><tr><th><a href="datum.html#proc/signal_cancel_activate_self">signal_cancel_activate_self</a></th><td>Used for signal registrars who wish to completely ignore all behavior
|
||
in the attack chain from parent types. Should be used sparingly, as
|
||
subtypes are meant to build on behavior from the parent type.</td></tr><tr><th><a href="datum.html#proc/signal_cancel_attack_by">signal_cancel_attack_by</a></th><td>Used for signal registrars who wish to completely ignore all behavior
|
||
in the attack chain from parent types calling <code>attack_by</code>. Should be
|
||
used sparingly, as subtypes are meant to build on behavior from the parent
|
||
type.</td></tr><tr><th><a href="datum.html#proc/signal_qdel">signal_qdel</a></th><td></td></tr><tr><th><a href="datum.html#proc/string_assoc_list">string_assoc_list</a></th><td>Caches associative lists with non-numeric stringify-able index keys and stringify-able values (text/typepath -> text/path/number).</td></tr><tr><th><a href="datum.html#proc/ui_act">ui_act</a></th><td>public</td></tr><tr><th><a href="datum.html#proc/ui_assets">ui_assets</a></th><td>public</td></tr><tr><th><a href="datum.html#proc/ui_close">ui_close</a></th><td>public</td></tr><tr><th><a href="datum.html#proc/ui_data">ui_data</a></th><td>public</td></tr><tr><th><a href="datum.html#proc/ui_host">ui_host</a></th><td>private</td></tr><tr><th><a href="datum.html#proc/ui_interact">ui_interact</a></th><td>External tgui definitions, such as src_object APIs.</td></tr><tr><th><a href="datum.html#proc/ui_modal_act">ui_modal_act</a></th><td>Call this from a proc that is called in ui_act() to process modal actions</td></tr><tr><th><a href="datum.html#proc/ui_modal_answer">ui_modal_answer</a></th><td>Calls the source's currently assigned modal's (if there is one) on_answer() proc. Private.</td></tr><tr><th><a href="datum.html#proc/ui_modal_bento">ui_modal_bento</a></th><td>Opens a bento input UI modal</td></tr><tr><th><a href="datum.html#proc/ui_modal_boolean">ui_modal_boolean</a></th><td>Opens a yes/no UI modal</td></tr><tr><th><a href="datum.html#proc/ui_modal_choice">ui_modal_choice</a></th><td>Opens a dropdown input UI modal</td></tr><tr><th><a href="datum.html#proc/ui_modal_clear">ui_modal_clear</a></th><td>Clears the current modal for a given datum</td></tr><tr><th><a href="datum.html#proc/ui_modal_data">ui_modal_data</a></th><td>Call this from ui_data() to return modal information if needed</td></tr><tr><th><a href="datum.html#proc/ui_modal_input">ui_modal_input</a></th><td>Opens a text input UI modal</td></tr><tr><th><a href="datum.html#proc/ui_modal_message">ui_modal_message</a></th><td>Opens a message UI modal</td></tr><tr><th><a href="datum.html#proc/ui_modal_new">ui_modal_new</a></th><td>Registers a given modal to a source. Private.</td></tr><tr><th><a href="datum.html#proc/ui_modal_preprocess_answer">ui_modal_preprocess_answer</a></th><td>Passes an answer from JS through the modal's proc.</td></tr><tr><th><a href="datum.html#proc/ui_state">ui_state</a></th><td>private</td></tr><tr><th><a href="datum.html#proc/ui_static_data">ui_static_data</a></th><td>public</td></tr><tr><th><a href="datum.html#proc/ui_status">ui_status</a></th><td>Base state and helpers for states. Just does some sanity checks,
|
||
implement a proper state for in-depth checks.</td></tr><tr><th><a href="datum.html#proc/update_static_data">update_static_data</a></th><td>public</td></tr><tr><th><a href="datum.html#proc/vv_do_topic">vv_do_topic</a></th><td>This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks!
|
||
href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
|
||
This proc is for "high level" actions like admin heal/set species/etc/etc. The low level debugging things should go in admin/view_variables/topic_basic.dm in case this runtimes.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/cached_ref"><aside class="declaration">var </aside>cached_ref <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datum.dm#L22"><img src="git.png" width="16" height="16" title="code/datums/datum.dm 22"></a></h3><p>A cached version of our \ref
|
||
The brunt of \ref costs are in creating entries in the string tree (a tree of immutable strings)
|
||
This avoids doing that more then once per datum by ensuring ref strings always have a reference to them after they're first pulled</p><h3 id="var/isprocessing"><aside class="declaration">var </aside>isprocessing <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datum.dm#L15"><img src="git.png" width="16" height="16" title="code/datums/datum.dm 15"></a></h3><p>Used by SSprocessing</p><h3 id="var/md5_unique_datum_id"><aside class="declaration">var </aside>md5_unique_datum_id <aside>– /tmp</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datum.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/datum.dm 12"></a></h3><p>MD5'd version of the UID. Used for instances where we dont want to make clients aware of UIDs.</p><h3 id="var/status_traits"><aside class="declaration">var </aside>status_traits <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datum.dm#L6"><img src="git.png" width="16" height="16" title="code/datums/datum.dm 6"></a></h3><p>Status traits attached to this datum</p><h3 id="var/tgui_shared_states"><aside class="declaration">var </aside>tgui_shared_states <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L122"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 122"></a></h3><p>global</p>
|
||
<p>Associative list of JSON-encoded shared states that were set by
|
||
tgui clients.</p><h2 id="proc">Proc Details</h2><h3 id="proc/CanProcCall"><aside class="declaration">proc </aside>CanProcCall<aside>(procname) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datumvars.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/datumvars.dm 9"></a></aside></h3><p>Proc to check if a datum allows proc calls on it</p>
|
||
<p>Returns TRUE if you can call a proc on the datum, FALSE if you cant</p><h3 id="proc/DeleteComponent"><aside class="declaration">proc </aside>DeleteComponent<aside>(component_to_nuke) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L447"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 447"></a></aside></h3><p>Removes the component from the datum</p><h3 id="proc/DeleteComponentsType"><aside class="declaration">proc </aside>DeleteComponentsType<aside>(component_type_to_nuke) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L455"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 455"></a></aside></h3><p>Removes all components of a given type from the datum</p><h3 id="proc/GetComponent"><aside class="declaration">proc </aside>GetComponent<aside>(/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/c_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L324"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 324"></a></aside></h3><p>Return any component assigned to this datum of the given type</p>
|
||
<p>This will throw an error if it's possible to have more than one component of that type on the parent</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>datum/component/c_type The typepath of the component you want to get a reference to</li>
|
||
</ul><h3 id="proc/GetComponents"><aside class="declaration">proc </aside>GetComponents<aside>(c_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L365"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 365"></a></aside></h3><p>Get all components of a given type that are attached to this datum</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>c_type The component type path</li>
|
||
</ul><h3 id="proc/GetExactComponent"><aside class="declaration">proc </aside>GetExactComponent<aside>(/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/c_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L344"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 344"></a></aside></h3><p>Return any component assigned to this datum of the exact given type</p>
|
||
<p>This will throw an error if it's possible to have more than one component of that type on the parent</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>datum/component/c_type The typepath of the component you want to get a reference to</li>
|
||
</ul><h3 id="proc/LoadComponent"><aside class="declaration">proc </aside>LoadComponent<aside>(component_type, ...) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L470"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 470"></a></aside></h3><p>Get existing component of type, or create it and return a reference to it</p>
|
||
<p>Use this if the item needs to exist at the time of this call, but may not have been created before now</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>component_type The typepath of the component to create or return</li>
|
||
<li>... additional arguments to be passed when creating the component if it does not exist</li>
|
||
</ul><h3 id="proc/MD5_UID"><aside class="declaration">proc </aside>MD5_UID<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/unique_ids.dm#L45"><img src="git.png" width="16" height="16" title="code/__HELPERS/unique_ids.dm 45"></a></aside></h3><p>Safety wrapper for getting MD5 UIDs</p>
|
||
<p>This ensures it exists before reading it</p><h3 id="proc/RegisterSignal"><aside class="declaration">proc </aside>RegisterSignal<aside>(/<a href="datum.html">datum</a>/target, sig_type_or_types, proctype, override) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L175"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 175"></a></aside></h3><p>Register to listen for a signal from the passed in target</p>
|
||
<p>This sets up a listening relationship such that when the target object emits a signal
|
||
the source datum this proc is called upon, will receive a callback to the given proctype
|
||
Return values from procs registered must be a bitfield</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>datum/target The target to listen for signals from</li>
|
||
<li>sig_type_or_types Either a string signal name, or a list of signal names (strings)</li>
|
||
<li>proctype The proc to call back when the signal is emitted</li>
|
||
<li>override If a previous registration exists you must explicitly set this</li>
|
||
</ul><h3 id="proc/RegisterSignals"><aside class="declaration">proc </aside>RegisterSignals<aside>(/<a href="datum.html">datum</a>/target, /list/signal_types, proctype, override) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L248"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 248"></a></aside></h3><p>Registers multiple signals to the same proc.</p><h3 id="proc/TakeComponent"><aside class="declaration">proc </aside>TakeComponent<aside>(/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L502"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 502"></a></aside></h3><p>Transfer this component to another parent</p>
|
||
<p>Component is taken from source datum</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>datum/component/target Target datum to transfer to</li>
|
||
</ul><h3 id="proc/TransferComponent"><aside class="declaration">proc </aside>TransferComponent<aside>(/<a href="datum.html">datum</a>/target, component_instance_or_typepath) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L547"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 547"></a></aside></h3><p>Transfer a single component from the source datum, to the target.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>datum/target - the target to move the component to</li>
|
||
<li>component_instance_or_typepath - either an already created component, or a component typepath</li>
|
||
</ul><h3 id="proc/TransferComponents"><aside class="declaration">proc </aside>TransferComponents<aside>(/<a href="datum.html">datum</a>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L526"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 526"></a></aside></h3><p>Transfer all components to target</p>
|
||
<p>All components from source datum are taken</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>/datum/target the target to move the components to</li>
|
||
</ul><h3 id="proc/UID"><aside class="declaration">proc </aside>UID<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/unique_ids.dm#L28"><img src="git.png" width="16" height="16" title="code/__HELPERS/unique_ids.dm 28"></a></aside></h3><p>Gets or creates the UID of a datum</p>
|
||
<p>BYOND refs are recycled, so this system prevents that. If a datum does not have a UID when this proc is ran, one will be created
|
||
Returns the UID of the datum</p><h3 id="proc/UnregisterSignal"><aside class="declaration">proc </aside>UnregisterSignal<aside>(/<a href="datum.html">datum</a>/target, sig_type_or_types) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L214"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 214"></a></aside></h3><p>Stop listening to a given signal from target</p>
|
||
<p>Breaks the relationship between target and source datum, removing the callback when the signal fires</p>
|
||
<p>Doesn't care if a registration exists or not</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>datum/target Datum to stop listening to signals from</li>
|
||
<li>sig_typeor_types Signal string key or list of signal keys to stop listening to specifically</li>
|
||
</ul><h3 id="proc/_AddComponent"><aside class="declaration">proc </aside>_AddComponent<aside>(/list/raw_args) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L384"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 384"></a></aside></h3><p>Creates an instance of <code>new_type</code> in the datum and attaches to it as parent</p>
|
||
<p>Sends the <a href="code/__DEFINES/dcs/datum_signals.html#define/COMSIG_COMPONENT_ADDED" title="COMSIG_COMPONENT_ADDED">COMSIG_COMPONENT_ADDED</a> signal to the datum</p>
|
||
<p>Returns the component that was created. Or the old component in a dupe situation where <a href="code/__DEFINES/dcs/dcs_flags.html#define/COMPONENT_DUPE_UNIQUE" title="COMPONENT_DUPE_UNIQUE">COMPONENT_DUPE_UNIQUE</a> was set</p>
|
||
<p>If this tries to add a component to an incompatible type, the component will be deleted and the result will be <code>null</code>. This is very unperformant, try not to do it</p>
|
||
<p>Properly handles duplicate situations based on the <code>dupe_mode</code> var</p><h3 id="proc/_AddElement"><aside class="declaration">proc </aside>_AddElement<aside>(/list/arguments) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L53"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 53"></a></aside></h3><p>Finds the singleton for the element type given and attaches it to src</p><h3 id="proc/_RemoveElement"><aside class="declaration">proc </aside>_RemoveElement<aside>(/list/arguments) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/_element.dm#L63"><img src="git.png" width="16" height="16" title="code/datums/elements/_element.dm 63"></a></aside></h3><p>Finds the singleton for the element type given and detaches it from src
|
||
You only need additional arguments beyond the type if you're using <a href="code/__DEFINES/dcs/dcs_flags.html#define/ELEMENT_BESPOKE" title="ELEMENT_BESPOKE">ELEMENT_BESPOKE</a></p><h3 id="proc/_SendSignal"><aside class="declaration">proc </aside>_SendSignal<aside>(sigtype, /list/arguments) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/_component.dm#L299"><img src="git.png" width="16" height="16" title="code/datums/components/_component.dm 299"></a></aside></h3><p>Internal proc to handle most all of the signaling procedure</p>
|
||
<p>Will runtime if used on datums with an empty component list</p>
|
||
<p>Use the <a href="code/__DEFINES/dcs/dcs_helpers.html#define/SEND_SIGNAL" title="SEND_SIGNAL">SEND_SIGNAL</a> define instead</p><h3 id="proc/_clear_signal_refs"><aside class="declaration">proc </aside>_clear_signal_refs<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datum.dm#L68"><img src="git.png" width="16" height="16" title="code/datums/datum.dm 68"></a></aside></h3><p>Do not override this. This proc exists solely to be overriden by /turf. This
|
||
allows it to ignore clearing out signals which refer to it, in order to keep
|
||
those signals valid after the turf has been changed.</p><h3 id="proc/add_traits"><aside class="declaration">proc </aside>add_traits<aside>(/list/list_of_traits, source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/trait_helpers.dm#L657"><img src="git.png" width="16" height="16" title="code/__HELPERS/trait_helpers.dm 657"></a></aside></h3><p>Proc that handles adding multiple traits to a target via a list. Must have a common source and target.</p><h3 id="proc/p_a"><aside class="declaration">proc </aside>p_a<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L67"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 67"></a></aside></h3><p>Functionally the \a macro, for the cases where you put a bicon between "some [bicon] pop corn"</p><h3 id="proc/p_are"><aside class="declaration">proc </aside>p_are<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L30"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 30"></a></aside></h3><p>Applies "is" for singular genders, or "are" for plural ones (e.g. "he is here" Vs. "they are here").</p><h3 id="proc/p_do"><aside class="declaration">proc </aside>p_do<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L38"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 38"></a></aside></h3><p>Applies "does" for singular genders, or "do" for plural ones (e.g. "she does stuff" Vs. "they do stuff").</p><h3 id="proc/p_es"><aside class="declaration">proc </aside>p_es<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L61"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 61"></a></aside></h3><p>Adds an "es" to the end of a word as appropriate for a particular gender (e.g. "he screeches" and "they screech"). For verb conjugation.</p><h3 id="proc/p_have"><aside class="declaration">proc </aside>p_have<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L26"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 26"></a></aside></h3><p>Applies "has" for singular genders, or "have" for plural ones (e.g. "she has eaten" Vs. "they have eaten").</p><h3 id="proc/p_s"><aside class="declaration">proc </aside>p_s<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L57"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 57"></a></aside></h3><p>Used to add an "s" to the end of a word as appropriate for a particular gender (e.g. "she looks" and "they look"). For verb conjugation.</p><h3 id="proc/p_their"><aside class="declaration">proc </aside>p_their<aside>(capitalized, temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L14"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 14"></a></aside></h3><p>Applies one of "their", "its", "his", or "her" as appropriate. Set to TRUE to capitalise.</p><h3 id="proc/p_them"><aside class="declaration">proc </aside>p_them<aside>(capitalized, temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L20"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 20"></a></aside></h3><p>Applies one of "them", "it", "him", or "her" as appropriate. Set to TRUE to capitalise.</p><h3 id="proc/p_themselves"><aside class="declaration">proc </aside>p_themselves<aside>(capitalized, temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L50"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 50"></a></aside></h3><p>Applies one of "themselves", "itself", "himself", or "herself" as appropriate. Set to TRUE to capitalise.</p><h3 id="proc/p_they"><aside class="declaration">proc </aside>p_they<aside>(capitalized, temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L8"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 8"></a></aside></h3><p>Applies one of "they", "it", "he", or "she" as appropriate. Set to TRUE to capitalise.</p><h3 id="proc/p_theyre"><aside class="declaration">proc </aside>p_theyre<aside>(capitalized, temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L46"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 46"></a></aside></h3><p>Applies one of "they're", "it's", "he's", or "she's" as appropriate. Set to TRUE to capitalise.</p><h3 id="proc/p_theyve"><aside class="declaration">proc </aside>p_theyve<aside>(capitalized, temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L42"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 42"></a></aside></h3><p>Applies one of "they've", "it's", "he's", or "she's" as appropriate. Set to TRUE to capitalise.</p><h3 id="proc/p_were"><aside class="declaration">proc </aside>p_were<aside>(temp_gender) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/pronouns.dm#L34"><img src="git.png" width="16" height="16" title="code/__HELPERS/pronouns.dm 34"></a></aside></h3><p>Applies "was" for singular genders, or "were" for plural ones (e.g. "it was huge" Vs. "they were huge").</p><h3 id="proc/remove_traits"><aside class="declaration">proc </aside>remove_traits<aside>(/list/list_of_traits, source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/trait_helpers.dm#L662"><img src="git.png" width="16" height="16" title="code/__HELPERS/trait_helpers.dm 662"></a></aside></h3><p>Proc that handles removing multiple traits from a target via a list. Must have a common source and target.</p><h3 id="proc/signal_cancel_activate_self"><aside class="declaration">proc </aside>signal_cancel_activate_self<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/_onclick/item_attack.dm#L320"><img src="git.png" width="16" height="16" title="code/_onclick/item_attack.dm 320"></a></aside></h3><p>Used for signal registrars who wish to completely ignore all behavior
|
||
in the attack chain from parent types. Should be used sparingly, as
|
||
subtypes are meant to build on behavior from the parent type.</p><h3 id="proc/signal_cancel_attack_by"><aside class="declaration">proc </aside>signal_cancel_attack_by<aside>(/<a href="datum.html">datum</a>/source, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/attacking, /<a href="mob.html">mob</a>/user, params) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/_onclick/item_attack.dm#L327"><img src="git.png" width="16" height="16" title="code/_onclick/item_attack.dm 327"></a></aside></h3><p>Used for signal registrars who wish to completely ignore all behavior
|
||
in the attack chain from parent types calling <code>attack_by</code>. Should be
|
||
used sparingly, as subtypes are meant to build on behavior from the parent
|
||
type.</p><h3 id="proc/signal_qdel"><aside class="declaration">proc </aside>signal_qdel<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/qdel.dm#L27"><img src="git.png" width="16" height="16" title="code/__HELPERS/qdel.dm 27"></a></aside></h3><h1 id="signal-qdel">Signal qdel</h1>
|
||
<p>Proc intended to be used when someone wants the src datum to be qdeled when a certain signal is sent to them.</p>
|
||
<p>Example usage:
|
||
RegisterSignal(item, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/datum, signal_qdel))</p><h3 id="proc/string_assoc_list"><aside class="declaration">proc </aside>string_assoc_list<aside>(/list/values) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/string_assoc_lists.dm#L6"><img src="git.png" width="16" height="16" title="code/__HELPERS/string_assoc_lists.dm 6"></a></aside></h3><p>Caches associative lists with non-numeric stringify-able index keys and stringify-able values (text/typepath -> text/path/number).</p><h3 id="proc/ui_act"><aside class="declaration">proc </aside>ui_act<aside>(action, /list/params, /<a href="datum.html">datum</a>/<a href="datum/tgui.html">tgui</a>/ui, /<a href="datum.html">datum</a>/<a href="datum/ui_state.html">ui_state</a>/state) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L81"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 81"></a></aside></h3><p>public</p>
|
||
<p>Called on a UI when the UI receieves a href.
|
||
Think of this as Topic().</p>
|
||
<p>required action string The action/button that has been invoked by the user.
|
||
required params list A list of parameters attached to the button.</p>
|
||
<p>return bool If the UI should be updated or not.</p><h3 id="proc/ui_assets"><aside class="declaration">proc </aside>ui_assets<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L94"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 94"></a></aside></h3><p>public</p>
|
||
<p>Called on an object when a tgui object is being created, allowing you to
|
||
push various assets to tgui, for examples spritesheets.</p>
|
||
<p>return list List of asset datums or file paths.</p><h3 id="proc/ui_close"><aside class="declaration">proc </aside>ui_close<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L151"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 151"></a></aside></h3><p>public</p>
|
||
<p>Called on a UI's object when the UI is closed, not to be confused with
|
||
client/verb/uiclose(), which closes the ui window</p><h3 id="proc/ui_data"><aside class="declaration">proc </aside>ui_data<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L30"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 30"></a></aside></h3><p>public</p>
|
||
<p>Data to be sent to the UI.
|
||
This must be implemented for a UI to work.</p>
|
||
<p>required user mob The mob interacting with the UI.</p>
|
||
<p>return list Data to be sent to the UI.</p><h3 id="proc/ui_host"><aside class="declaration">proc </aside>ui_host<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L104"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 104"></a></aside></h3><p>private</p>
|
||
<p>The UI's host object (usually src_object).
|
||
This allows modules/datums to have the UI attached to them,
|
||
and be a part of another object.</p><h3 id="proc/ui_interact"><aside class="declaration">proc </aside>ui_interact<aside>(/<a href="mob.html">mob</a>/user, /<a href="datum.html">datum</a>/<a href="datum/tgui.html">tgui</a>/ui) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L17"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 17"></a></aside></h3><p>External tgui definitions, such as src_object APIs.</p>
|
||
<p>Copyright (c) 2020 Aleksej Komarov
|
||
SPDX-License-Identifier: MIT</p>
|
||
<p>public</p>
|
||
<p>Used to open and update UIs.
|
||
If this proc is not implemented properly, the UI will not update correctly.</p>
|
||
<p>required user mob The mob who opened/is using the UI.
|
||
optional ui datum/tgui The UI to be updated, if it exists.</p><h3 id="proc/ui_modal_act"><aside class="declaration">proc </aside>ui_modal_act<aside>(/<a href="datum.html">datum</a>/source, action, params) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L20"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 20"></a></aside></h3><p>Call this from a proc that is called in ui_act() to process modal actions</p>
|
||
<p>Example: /obj/machinery/chem_master/proc/ui_act_modal
|
||
You can then switch based on the return value and show different
|
||
modals depending on the answer.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>action - The called action</li>
|
||
<li>params - The params to the action</li>
|
||
</ul><h3 id="proc/ui_modal_answer"><aside class="declaration">proc </aside>ui_modal_answer<aside>(/<a href="datum.html">datum</a>/source, id, answer) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L201"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 201"></a></aside></h3><p>Calls the source's currently assigned modal's (if there is one) on_answer() proc. Private.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>id - The ID of the modal</li>
|
||
<li>answer - The provided answer</li>
|
||
</ul><h3 id="proc/ui_modal_bento"><aside class="declaration">proc </aside>ui_modal_bento<aside>(/<a href="datum.html">datum</a>/source, id, text, delegate, arguments, value, choices) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L143"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 143"></a></aside></h3><p>Opens a bento input UI modal</p>
|
||
<p>Internally checks if the answer is in the list of choices.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>id - The ID of the modal</li>
|
||
<li>text - The text to display above the answers</li>
|
||
<li>delegate - The proc to call when submitted</li>
|
||
<li>arguments - List of arguments passed to and from JS (mostly useful for chaining modals)</li>
|
||
<li>value - The default value of the bento</li>
|
||
<li>choices - The list of available choices in the bento</li>
|
||
</ul><h3 id="proc/ui_modal_boolean"><aside class="declaration">proc </aside>ui_modal_boolean<aside>(/<a href="datum.html">datum</a>/source, id, text, delegate, delegate_no, arguments, yes_text, no_text) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L162"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 162"></a></aside></h3><p>Opens a yes/no UI modal</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>id - The ID of the modal</li>
|
||
<li>text - The text to display above the answers</li>
|
||
<li>delegate - The proc to call when "Yes" is pressed</li>
|
||
<li>delegate_no - The proc to call when "No" is pressed</li>
|
||
<li>arguments - List of arguments passed to and from JS (mostly useful for chaining modals)</li>
|
||
<li>yes_text - The text to show in the "Yes" button</li>
|
||
<li>no_text - The text to show in the "No" button</li>
|
||
</ul><h3 id="proc/ui_modal_choice"><aside class="declaration">proc </aside>ui_modal_choice<aside>(/<a href="datum.html">datum</a>/source, id, text, delegate, arguments, value, choices) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L124"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 124"></a></aside></h3><p>Opens a dropdown input UI modal</p>
|
||
<p>Internally checks if the answer is in the list of choices.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>id - The ID of the modal</li>
|
||
<li>text - The text to display above the answers</li>
|
||
<li>delegate - The proc to call when submitted</li>
|
||
<li>arguments - List of arguments passed to and from JS (mostly useful for chaining modals)</li>
|
||
<li>value - The default value of the dropdown</li>
|
||
<li>choices - The list of available choices in the dropdown</li>
|
||
</ul><h3 id="proc/ui_modal_clear"><aside class="declaration">proc </aside>ui_modal_clear<aside>(/<a href="datum.html">datum</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L59"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 59"></a></aside></h3><p>Clears the current modal for a given datum</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
</ul><h3 id="proc/ui_modal_data"><aside class="declaration">proc </aside>ui_modal_data<aside>(/<a href="datum.html">datum</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L44"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 44"></a></aside></h3><p>Call this from ui_data() to return modal information if needed</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
</ul><h3 id="proc/ui_modal_input"><aside class="declaration">proc </aside>ui_modal_input<aside>(/<a href="datum.html">datum</a>/source, id, text, delegate, arguments, value, max_length) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L104"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 104"></a></aside></h3><p>Opens a text input UI modal</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>id - The ID of the modal</li>
|
||
<li>text - The text to display above the answers</li>
|
||
<li>delegate - The proc to call when submitted</li>
|
||
<li>arguments - List of arguments passed to and from JS (mostly useful for chaining modals)</li>
|
||
<li>value - The default value of the input</li>
|
||
<li>max_length - The maximum char length of the input</li>
|
||
</ul><h3 id="proc/ui_modal_message"><aside class="declaration">proc </aside>ui_modal_message<aside>(/<a href="datum.html">datum</a>/source, id, text, delegate, arguments) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L86"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 86"></a></aside></h3><p>Opens a message UI modal</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>id - The ID of the modal</li>
|
||
<li>text - The text to display above the answers</li>
|
||
<li>delegate - The proc to call when closed</li>
|
||
<li>arguments - List of arguments passed to and from JS (mostly useful for chaining modals)</li>
|
||
</ul><h3 id="proc/ui_modal_new"><aside class="declaration">proc </aside>ui_modal_new<aside>(/<a href="datum.html">datum</a>/source, /<a href="datum.html">datum</a>/<a href="datum/ui_modal.html">ui_modal</a>/modal, replace_previous, instant_update) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L177"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 177"></a></aside></h3><p>Registers a given modal to a source. Private.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>modal - The datum/ui_modal to register</li>
|
||
<li>replace_previous - Whether any modal currently assigned to source should be replaced</li>
|
||
<li>instant_update - Whether the changes should reflect immediately</li>
|
||
</ul><h3 id="proc/ui_modal_preprocess_answer"><aside class="declaration">proc </aside>ui_modal_preprocess_answer<aside>(/<a href="datum.html">datum</a>/source, answer) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/plugins/modal.dm#L219"><img src="git.png" width="16" height="16" title="code/modules/tgui/plugins/modal.dm 219"></a></aside></h3><p>Passes an answer from JS through the modal's proc.</p>
|
||
<p>Used namely for cutting the text short if it's longer
|
||
than an input modal's max_length.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>source - The source datum</li>
|
||
<li>answer - The provided answer</li>
|
||
</ul><h3 id="proc/ui_state"><aside class="declaration">proc </aside>ui_state<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L113"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 113"></a></aside></h3><p>private</p>
|
||
<p>The UI's state controller to be used for created uis
|
||
This is a proc over a var for memory reasons</p><h3 id="proc/ui_static_data"><aside class="declaration">proc </aside>ui_static_data<aside>(/<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L51"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 51"></a></aside></h3><p>public</p>
|
||
<p>Static Data to be sent to the UI.</p>
|
||
<p>Static data differs from normal data in that it's large data that should be
|
||
sent infrequently. This is implemented optionally for heavy uis that would
|
||
be sending a lot of redundant data frequently. Gets squished into one
|
||
object on the frontend side, but the static part is cached.</p>
|
||
<p>required user mob The mob interacting with the UI.</p>
|
||
<p>return list Statuic Data to be sent to the UI.</p><h3 id="proc/ui_status"><aside class="declaration">proc </aside>ui_status<aside>(/<a href="mob.html">mob</a>/user, /<a href="datum.html">datum</a>/<a href="datum/ui_state.html">ui_state</a>/state) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/states.dm#L19"><img src="git.png" width="16" height="16" title="code/modules/tgui/states.dm 19"></a></aside></h3><p>Base state and helpers for states. Just does some sanity checks,
|
||
implement a proper state for in-depth checks.</p>
|
||
<p>Copyright (c) 2020 Aleksej Komarov
|
||
SPDX-License-Identifier: MIT</p>
|
||
<p>public</p>
|
||
<p>Checks the UI state for a mob.</p>
|
||
<p>required user mob The mob who opened/is using the UI.
|
||
required state datum/ui_state The state to check.</p>
|
||
<p>return UI_state The state of the UI.</p><h3 id="proc/update_static_data"><aside class="declaration">proc </aside>update_static_data<aside>(/<a href="mob.html">mob</a>/user, /<a href="datum.html">datum</a>/<a href="datum/tgui.html">tgui</a>/ui) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/tgui/external.dm#L64"><img src="git.png" width="16" height="16" title="code/modules/tgui/external.dm 64"></a></aside></h3><p>public</p>
|
||
<p>Forces an update on static data. Should be done manually whenever something
|
||
happens to change static data.</p>
|
||
<p>required user the mob currently interacting with the ui
|
||
optional ui ui to be updated</p><h3 id="proc/vv_do_topic"><aside class="declaration">proc </aside>vv_do_topic<aside>(/list/href_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/datumvars.dm#L104"><img src="git.png" width="16" height="16" title="code/datums/datumvars.dm 104"></a></aside></h3><p>This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks!
|
||
href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
|
||
This proc is for "high level" actions like admin heal/set species/etc/etc. The low level debugging things should go in admin/view_variables/topic_basic.dm in case this runtimes.</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> |