Files

24 lines
16 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/action - 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/action.html#var">Var Details</a> - <a href="datum/action.html#proc">Proc Details</a></header><main><h1>action <aside>/<a href="datum.html">datum</a>/<a href="datum/action.html">action</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L1"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 1"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/action.html#var/action_disabled">action_disabled</a></th><td>Toggles whether this action is usable or not</td></tr><tr><th><a href="datum/action.html#var/background_icon">background_icon</a></th><td>This is the icon state state for the BACKGROUND underlay icon of the button
(If set to ACTION_BUTTON_DEFAULT_BACKGROUND, uses the hud's default background)</td></tr><tr><th><a href="datum/action.html#var/background_icon_state">background_icon_state</a></th><td>Icon state of screen object background</td></tr><tr><th><a href="datum/action.html#var/button_icon">button_icon</a></th><td>This is the file for the icon that appears on the button</td></tr><tr><th><a href="datum/action.html#var/button_icon_state">button_icon_state</a></th><td>This is the icon state for the icon that appears on the button</td></tr><tr><th><a href="datum/action.html#var/default_button_position">default_button_position</a></th><td>Where any buttons we create should be by default. Accepts screen_loc and location defines</td></tr><tr><th><a href="datum/action.html#var/overlay_icon">overlay_icon</a></th><td>This is the file for any FOREGROUND overlay icons on the button (such as borders)</td></tr><tr><th><a href="datum/action.html#var/overlay_icon_state">overlay_icon_state</a></th><td>This is the icon state for any FOREGROUND overlay icons on the button (such as borders)</td></tr><tr><th><a href="datum/action.html#var/owner_has_control">owner_has_control</a></th><td>If False, the owner of this action does not get a hud and cannot activate it on their own</td></tr><tr><th><a href="datum/action.html#var/show_to_observers">show_to_observers</a></th><td>Whether or not this will be shown to observers</td></tr><tr><th><a href="datum/action.html#var/viewers">viewers</a></th><td>Map of huds viewing a button with our action -&gt; their button</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/action.html#proc/apply_button_background">apply_button_background</a></th><td>Creates the background underlay for the button</td></tr><tr><th><a href="datum/action.html#proc/apply_button_icon">apply_button_icon</a></th><td>Applies our button icon and icon state to the button</td></tr><tr><th><a href="datum/action.html#proc/apply_button_overlay">apply_button_overlay</a></th><td>Applies any overlays to our button</td></tr><tr><th><a href="datum/action.html#proc/build_all_button_icons">build_all_button_icons</a></th><td>Builds / updates all buttons we have shared or given out</td></tr><tr><th><a href="datum/action.html#proc/build_button_icon">build_button_icon</a></th><td>Builds the icon of the button.</td></tr><tr><th><a href="datum/action.html#proc/is_action_active">is_action_active</a></th><td>Checks if our action is actively selected. Used for selecting icons primarily.</td></tr><tr><th><a href="datum/action.html#proc/link_to">link_to</a></th><td>Links the passed target to our action, registering any relevant signals</td></tr><tr><th><a href="datum/action.html#proc/on_target_icon_update">on_target_icon_update</a></th><td>Updates our buttons if our target's icon was updated</td></tr><tr><th><a href="datum/action.html#proc/update_button_name">update_button_name</a></th><td>Updates the name and description of the button to match our action name and discription.</td></tr><tr><th><a href="datum/action.html#proc/update_button_status">update_button_status</a></th><td>Any other miscellaneous &quot;status&quot; updates within the action button is handled here,
such as redding out when unavailable or modifying maptext.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/action_disabled"><aside class="declaration">var </aside>action_disabled <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L32"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 32"></a></h3><p>Toggles whether this action is usable or not</p><h3 id="var/background_icon"><aside class="declaration">var </aside>background_icon <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 9"></a></h3><p>This is the icon state state for the BACKGROUND underlay icon of the button
(If set to ACTION_BUTTON_DEFAULT_BACKGROUND, uses the hud's default background)</p><h3 id="var/background_icon_state"><aside class="declaration">var </aside>background_icon_state <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L11"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 11"></a></h3><p>Icon state of screen object background</p><h3 id="var/button_icon"><aside class="declaration">var </aside>button_icon <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 14"></a></h3><p>This is the file for the icon that appears on the button</p><h3 id="var/button_icon_state"><aside class="declaration">var </aside>button_icon_state <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 16"></a></h3><p>This is the icon state for the icon that appears on the button</p><h3 id="var/default_button_position"><aside class="declaration">var </aside>default_button_position <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L26"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 26"></a></h3><p>Where any buttons we create should be by default. Accepts screen_loc and location defines</p><h3 id="var/overlay_icon"><aside class="declaration">var </aside>overlay_icon <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L19"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 19"></a></h3><p>This is the file for any FOREGROUND overlay icons on the button (such as borders)</p><h3 id="var/overlay_icon_state"><aside class="declaration">var </aside>overlay_icon_state <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L21"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 21"></a></h3><p>This is the icon state for any FOREGROUND overlay icons on the button (such as borders)</p><h3 id="var/owner_has_control"><aside class="declaration">var </aside>owner_has_control <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L34"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 34"></a></h3><p>If False, the owner of this action does not get a hud and cannot activate it on their own</p><h3 id="var/show_to_observers"><aside class="declaration">var </aside>show_to_observers <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L30"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 30"></a></h3><p>Whether or not this will be shown to observers</p><h3 id="var/viewers"><aside class="declaration">var </aside>viewers <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L28"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 28"></a></h3><p>Map of huds viewing a button with our action -&gt; their button</p><h2 id="proc">Proc Details</h2><h3 id="proc/apply_button_background"><aside class="declaration">proc </aside>apply_button_background<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L309"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 309"></a></aside></h3><p>Creates the background underlay for the button</p>
<p>button - what button are we editing?
force - whether an update is forced regardless of existing status</p><h3 id="proc/apply_button_icon"><aside class="declaration">proc </aside>apply_button_icon<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L342"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 342"></a></aside></h3><p>Applies our button icon and icon state to the button</p>
<p>button - what button are we editing?
force - whether an update is forced regardless of existing status</p><h3 id="proc/apply_button_overlay"><aside class="declaration">proc </aside>apply_button_overlay<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L288"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 288"></a></aside></h3><p>Applies any overlays to our button</p>
<p>button - what button are we editing?
force - whether an update is forced regardless of existing status</p><h3 id="proc/build_all_button_icons"><aside class="declaration">proc </aside>build_all_button_icons<aside>(update_flags, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L102"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 102"></a></aside></h3><p>Builds / updates all buttons we have shared or given out</p><h3 id="proc/build_button_icon"><aside class="declaration">proc </aside>build_button_icon<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button, update_flags, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L157"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 157"></a></aside></h3><p>Builds the icon of the button.</p>
<p>Concept:</p>
<ul>
<li>Underlay (Background icon)</li>
<li>Icon (button icon)</li>
<li>Maptext</li>
<li>Overlay (Background border)</li>
</ul>
<p>button - which button we are modifying the icon of
force - whether we're forcing a full update</p><h3 id="proc/is_action_active"><aside class="declaration">proc </aside>is_action_active<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L300"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 300"></a></aside></h3><p>Checks if our action is actively selected. Used for selecting icons primarily.</p><h3 id="proc/link_to"><aside class="declaration">proc </aside>link_to<aside>(target_) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L40"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 40"></a></aside></h3><p>Links the passed target to our action, registering any relevant signals</p><h3 id="proc/on_target_icon_update"><aside class="declaration">proc </aside>on_target_icon_update<aside>(/<a href="datum.html">datum</a>/source, updates, updated) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L350"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 350"></a></aside></h3><p>Updates our buttons if our target's icon was updated</p><h3 id="proc/update_button_name"><aside class="declaration">proc </aside>update_button_name<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L182"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 182"></a></aside></h3><p>Updates the name and description of the button to match our action name and discription.</p>
<p>button - what button are we editing?
force - whether an update is forced regardless of existing status</p><h3 id="proc/update_button_status"><aside class="declaration">proc </aside>update_button_status<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a>/<a href="atom/movable/screen/movable.html">movable</a>/<a href="atom/movable/screen/movable/action_button.html">action_button</a>/button, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/actions/action.dm#L194"><img src="git.png" width="16" height="16" title="code/datums/actions/action.dm 194"></a></aside></h3><p>Any other miscellaneous &quot;status&quot; updates within the action button is handled here,
such as redding out when unavailable or modifying maptext.</p>
<p>button - what button are we editing?
force - whether an update is forced regardless of existing status</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>