mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
11 lines
5.3 KiB
HTML
11 lines
5.3 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/click_intercept - 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/click_intercept.html#var">Var Details</a> - <a href="datum/click_intercept.html#proc">Proc Details</a></header><main><h1>Click intercept datum <aside>/<a href="datum.html">datum</a>/<a href="datum/click_intercept.html">click_intercept</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/click_intercept.dm#L8"><img src="git.png" width="16" height="16" title="code/datums/click_intercept.dm 8"></a></h1><p>Datum which is intended to be stored by a client's <code>click_intercept</code> variable.
|
||
Used to override normal clicking behavior when clicking on an object.
|
||
While active, a mob's <code>ClickOn</code> proc will redirect to the <code>InterceptClickOn()</code> proc instead.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/click_intercept.html#var/buttons">buttons</a></th><td>Any <code>atom/movable/screen/buttons</code> the client is meant to receive when assigned this click intercept datum.</td></tr><tr><th><a href="datum/click_intercept.html#var/holder">holder</a></th><td>A reference to the client which is assigned this click intercept datum.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/click_intercept.html#proc/InterceptClickOn">InterceptClickOn</a></th><td>Called in various mob's <code>ClickOn</code> procs, which happens when they click on an object in the world.</td></tr><tr><th><a href="datum/click_intercept.html#proc/create_buttons">create_buttons</a></th><td>Base proc, intended to be overriden. Code that adds datum specific buttons to the list of <code>buttons</code>, should go here.</td></tr><tr><th><a href="datum/click_intercept.html#proc/quit">quit</a></th><td>Called when you want to cancel a client's click intercept and return to normal clicking.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/buttons"><aside class="declaration">var </aside>buttons <aside>– /list/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/screen.html">screen</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/click_intercept.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/click_intercept.dm 12"></a></h3><p>Any <code>atom/movable/screen/buttons</code> the client is meant to receive when assigned this click intercept datum.</p><h3 id="var/holder"><aside class="declaration">var </aside>holder <aside>– /<a href="client.html">client</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/click_intercept.dm#L10"><img src="git.png" width="16" height="16" title="code/datums/click_intercept.dm 10"></a></h3><p>A reference to the client which is assigned this click intercept datum.</p><h2 id="proc">Proc Details</h2><h3 id="proc/InterceptClickOn"><aside class="declaration">proc </aside>InterceptClickOn<aside>(/<a href="mob.html">mob</a>/user, params, /<a href="atom.html">atom</a>/object) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/click_intercept.dm#L53"><img src="git.png" width="16" height="16" title="code/datums/click_intercept.dm 53"></a></aside></h3><p>Called in various mob's <code>ClickOn</code> procs, which happens when they click on an object in the world.</p>
|
||
<p>If the mob's <code>client.click_intercept</code> variable is set to something other than null, calls the <code>InterceptClickOn</code> proc for that click intercept datum. Aka, this proc.</p>
|
||
<p>If you return TRUE, click on ends the click. Otherwise, normal clicking happens
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>user - the mob which just clicked on something.</li>
|
||
<li>params - the <code>params</code> arguemnt passed from the <code>ClickOn</code> proc.</li>
|
||
<li>object - the atom that was just clicked.</li>
|
||
</ul><h3 id="proc/create_buttons"><aside class="declaration">proc </aside>create_buttons<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/click_intercept.dm#L39"><img src="git.png" width="16" height="16" title="code/datums/click_intercept.dm 39"></a></aside></h3><p>Base proc, intended to be overriden. Code that adds datum specific buttons to the list of <code>buttons</code>, should go here.</p><h3 id="proc/quit"><aside class="declaration">proc </aside>quit<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/click_intercept.dm#L33"><img src="git.png" width="16" height="16" title="code/datums/click_intercept.dm 33"></a></aside></h3><p>Called when you want to cancel a client's click intercept and return to normal clicking.</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> |