mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
10 lines
10 KiB
HTML
10 lines
10 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/deadchat_control - 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/deadchat_control.html#var">Var Details</a> - <a href="datum/component/deadchat_control.html#proc">Proc Details</a></header><main><h1>deadchat_control <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/deadchat_control.html">deadchat_control</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L8"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 8"></a></h1><p>Deadchat Plays Things - The Componenting</p>
|
||
<p>Allows deadchat to control stuff and things by typing commands into chat.
|
||
These commands will then trigger callbacks to execute procs!</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/deadchat_control.html#var/ckey_to_cooldown">ckey_to_cooldown</a></th><td>Assoc list of ckey:value pairings. In DEADCHAT_DEMOCRACY_MODE, value is the player's vote. In DEADCHAT_ANARCHY_MODE, value is world.time when their cooldown expires.</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/deadchat_mode">deadchat_mode</a></th><td>A bitfield containing the mode which this component uses (DEADCHAT_DEMOCRACY_MODE or DEADCHAT_ANARCHY_MODE) and other settings)</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/generated_point_of_interest">generated_point_of_interest</a></th><td>Set to true if a point of interest was created for an object, and needs to be removed if deadchat control is removed. Needed for preventing objects from having two points of interest.</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/input_cooldown">input_cooldown</a></th><td>In DEADCHAT_DEMOCRACY_MODE, this is how long players have to vote on an input. In DEADCHAT_ANARCHY_MODE, this is how long between inputs for each unique player.</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/inputs">inputs</a></th><td>Assoc list of key-chat command string, value-callback pairs. list("right" = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(_step), src, EAST))</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/on_removal">on_removal</a></th><td>Callback invoked when this component is Destroy()ed to allow the parent to return to a non-deadchat controlled state.</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/orbiters">orbiters</a></th><td>List of everything orbitting this component's parent.</td></tr><tr><th><a href="datum/component/deadchat_control.html#var/timerid">timerid</a></th><td>The id for the DEADCHAT_DEMOCRACY_MODE looping vote timer.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/deadchat_control.html#proc/_step">_step</a></th><td>Dummy to call since we can't proc reference builtins</td></tr><tr><th><a href="datum/component/deadchat_control.html#proc/end_cooldown">end_cooldown</a></th><td>Removes the ghost from the ckey_to_cooldown list and lets them know they are free to submit a command for the parent again.</td></tr><tr><th><a href="datum/component/deadchat_control.html#proc/on_examine">on_examine</a></th><td>Informs any examiners to the inputs available as part of deadchat control, as well as the current operating mode and cooldowns.</td></tr><tr><th><a href="datum/component/deadchat_control.html#proc/waive_automute">waive_automute</a></th><td>Prevents messages used to control the parent from counting towards the automute threshold for repeated identical messages.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/ckey_to_cooldown"><aside class="declaration">var </aside>ckey_to_cooldown <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 16"></a></h3><p>Assoc list of ckey:value pairings. In DEADCHAT_DEMOCRACY_MODE, value is the player's vote. In DEADCHAT_ANARCHY_MODE, value is world.time when their cooldown expires.</p><h3 id="var/deadchat_mode"><aside class="declaration">var </aside>deadchat_mode <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L20"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 20"></a></h3><p>A bitfield containing the mode which this component uses (DEADCHAT_DEMOCRACY_MODE or DEADCHAT_ANARCHY_MODE) and other settings)</p><h3 id="var/generated_point_of_interest"><aside class="declaration">var </aside>generated_point_of_interest <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L24"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 24"></a></h3><p>Set to true if a point of interest was created for an object, and needs to be removed if deadchat control is removed. Needed for preventing objects from having two points of interest.</p><h3 id="var/input_cooldown"><aside class="declaration">var </aside>input_cooldown <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L22"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 22"></a></h3><p>In DEADCHAT_DEMOCRACY_MODE, this is how long players have to vote on an input. In DEADCHAT_ANARCHY_MODE, this is how long between inputs for each unique player.</p><h3 id="var/inputs"><aside class="declaration">var </aside>inputs <aside>– /list/<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 14"></a></h3><p>Assoc list of key-chat command string, value-callback pairs. list("right" = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(_step), src, EAST))</p><h3 id="var/on_removal"><aside class="declaration">var </aside>on_removal <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L26"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 26"></a></h3><p>Callback invoked when this component is Destroy()ed to allow the parent to return to a non-deadchat controlled state.</p><h3 id="var/orbiters"><aside class="declaration">var </aside>orbiters <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 18"></a></h3><p>List of everything orbitting this component's parent.</p><h3 id="var/timerid"><aside class="declaration">var </aside>timerid <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 12"></a></h3><p>The id for the DEADCHAT_DEMOCRACY_MODE looping vote timer.</p><h2 id="proc">Proc Details</h2><h3 id="proc/_step"><aside class="declaration">proc </aside>_step<aside>(ref, dir) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L227"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 227"></a></aside></h3><p>Dummy to call since we can't proc reference builtins</p><h3 id="proc/end_cooldown"><aside class="declaration">proc </aside>end_cooldown<aside>(ghost_ckey) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L219"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 219"></a></aside></h3><p>Removes the ghost from the ckey_to_cooldown list and lets them know they are free to submit a command for the parent again.</p><h3 id="proc/on_examine"><aside class="declaration">proc </aside>on_examine<aside>(/<a href="atom.html">atom</a>/A, /<a href="mob.html">mob</a>/user, /list/examine_list) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L188"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 188"></a></aside></h3><p>Informs any examiners to the inputs available as part of deadchat control, as well as the current operating mode and cooldowns.</p><h3 id="proc/waive_automute"><aside class="declaration">proc </aside>waive_automute<aside>(/<a href="mob.html">mob</a>/speaker, /<a href="client.html">client</a>/client, message, mute_type) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/deadchat_control.dm#L180"><img src="git.png" width="16" height="16" title="code/datums/components/deadchat_control.dm 180"></a></aside></h3><p>Prevents messages used to control the parent from counting towards the automute threshold for repeated identical messages.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li><a href="client.html" title="/client">speaker</a>: The mob that is trying to speak.</li>
|
||
<li><a href="client.html" title="/client">client</a>: The client that is trying to speak.</li>
|
||
<li>message: The message that the speaker is trying to say.</li>
|
||
<li>mute_type: Which type of mute the message counts towards.</li>
|
||
</ul></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> |