mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
30 lines
12 KiB
HTML
30 lines
12 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/tippable - 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/tippable.html#var">Var Details</a> - <a href="datum/component/tippable.html#proc">Proc Details</a></header><main><h1>tippable <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/tippable.html">tippable</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L4"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 4"></a></h1><p>Tippable component. For making mobs able to be tipped, like cows and medibots.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/tippable.html#var/is_tipped">is_tipped</a></th><td>Whether the mob is currently tipped.</td></tr><tr><th><a href="datum/component/tippable.html#var/post_tipped_callback">post_tipped_callback</a></th><td>Callback to additional behavior after successfully tipping the mob.</td></tr><tr><th><a href="datum/component/tippable.html#var/post_untipped_callback">post_untipped_callback</a></th><td>Callback to additional behavior after being untipped.</td></tr><tr><th><a href="datum/component/tippable.html#var/pre_tipped_callback">pre_tipped_callback</a></th><td>Callback to additional behavior before being tipped (on try_tip). Return anything from this callback to cancel the tip.</td></tr><tr><th><a href="datum/component/tippable.html#var/self_right_time">self_right_time</a></th><td>Time it takes for the mob to right itself. Can be 0 for instant self-righting, or null, to never self-right.</td></tr><tr><th><a href="datum/component/tippable.html#var/self_untip_timer">self_untip_timer</a></th><td>The timer given until they untip themselves</td></tr><tr><th><a href="datum/component/tippable.html#var/tip_time">tip_time</a></th><td>Time it takes to tip the mob. Can be 0, for instant tipping.</td></tr><tr><th><a href="datum/component/tippable.html#var/untip_time">untip_time</a></th><td>Time it takes to untip the mob. Can also be 0, for instant untip.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/tippable.html#proc/do_tip">do_tip</a></th><td>Actually tip over the mob, setting it to tipped.
|
||
Also invoking any callbacks we have, with the tipper as the argument,
|
||
and set a timer to right our self-right our tipped mob if we can.</td></tr><tr><th><a href="datum/component/tippable.html#proc/do_untip">do_untip</a></th><td>Actually untip over the mob, setting it to untipped.
|
||
Also invoke any untip callbacks we have, with the untipper as the argument.</td></tr><tr><th><a href="datum/component/tippable.html#proc/interact_with_tippable">interact_with_tippable</a></th><td>Attempt to interact with [source], either tipping it or helping it up.</td></tr><tr><th><a href="datum/component/tippable.html#proc/right_self">right_self</a></th><td>Proc called after a timer to have a tipped mob un-tip itself after a certain length of time.
|
||
Sets our mob to untipped and invokes the untipped callback without any arguments if we have one.</td></tr><tr><th><a href="datum/component/tippable.html#proc/set_tipped_status">set_tipped_status</a></th><td>Toggles our tipped status between tipped or untipped (TRUE or FALSE)
|
||
also handles rotating our mob and adding immobilization traits</td></tr><tr><th><a href="datum/component/tippable.html#proc/try_tip">try_tip</a></th><td>Try to tip over [tipped_mob].
|
||
If the mob is dead, or optional callback returns a value, or our do-after fails, we don't tip the mob.
|
||
Otherwise, upon completing of the do_after, tip over the mob.</td></tr><tr><th><a href="datum/component/tippable.html#proc/try_untip">try_untip</a></th><td>Try to untip a mob that has been tipped.
|
||
After a do-after is completed, we untip the mob.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/is_tipped"><aside class="declaration">var </aside>is_tipped <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 12"></a></h3><p>Whether the mob is currently tipped.</p><h3 id="var/post_tipped_callback"><aside class="declaration">var </aside>post_tipped_callback <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 16"></a></h3><p>Callback to additional behavior after successfully tipping the mob.</p><h3 id="var/post_untipped_callback"><aside class="declaration">var </aside>post_untipped_callback <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 18"></a></h3><p>Callback to additional behavior after being untipped.</p><h3 id="var/pre_tipped_callback"><aside class="declaration">var </aside>pre_tipped_callback <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 14"></a></h3><p>Callback to additional behavior before being tipped (on try_tip). Return anything from this callback to cancel the tip.</p><h3 id="var/self_right_time"><aside class="declaration">var </aside>self_right_time <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L10"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 10"></a></h3><p>Time it takes for the mob to right itself. Can be 0 for instant self-righting, or null, to never self-right.</p><h3 id="var/self_untip_timer"><aside class="declaration">var </aside>self_untip_timer <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L20"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 20"></a></h3><p>The timer given until they untip themselves</p><h3 id="var/tip_time"><aside class="declaration">var </aside>tip_time <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L6"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 6"></a></h3><p>Time it takes to tip the mob. Can be 0, for instant tipping.</p><h3 id="var/untip_time"><aside class="declaration">var </aside>untip_time <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L8"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 8"></a></h3><p>Time it takes to untip the mob. Can also be 0, for instant untip.</p><h2 id="proc">Proc Details</h2><h3 id="proc/do_tip"><aside class="declaration">proc </aside>do_tip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/tipped_mob, /<a href="mob.html">mob</a>/tipper) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L108"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 108"></a></aside></h3><p>Actually tip over the mob, setting it to tipped.
|
||
Also invoking any callbacks we have, with the tipper as the argument,
|
||
and set a timer to right our self-right our tipped mob if we can.</p>
|
||
<p>tipped_mob - the mob who was tipped
|
||
tipper - the mob who tipped the tipped_mob</p><h3 id="proc/do_untip"><aside class="declaration">proc </aside>do_untip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/tipped_mob, /<a href="mob.html">mob</a>/untipper) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L159"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 159"></a></aside></h3><p>Actually untip over the mob, setting it to untipped.
|
||
Also invoke any untip callbacks we have, with the untipper as the argument.</p>
|
||
<p>tipped_mob - the mob who was tipped
|
||
tipper - the mob who tipped the tipped_mob</p><h3 id="proc/interact_with_tippable"><aside class="declaration">proc </aside>interact_with_tippable<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/source, /<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L59"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 59"></a></aside></h3><p>Attempt to interact with [source], either tipping it or helping it up.</p>
|
||
<p>source - the mob being tipped over
|
||
user - the mob interacting with source</p><h3 id="proc/right_self"><aside class="declaration">proc </aside>right_self<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/tipped_mob) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L182"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 182"></a></aside></h3><p>Proc called after a timer to have a tipped mob un-tip itself after a certain length of time.
|
||
Sets our mob to untipped and invokes the untipped callback without any arguments if we have one.</p>
|
||
<p>tipped_mob - the mob who was tipped, and is freeing itself</p><h3 id="proc/set_tipped_status"><aside class="declaration">proc </aside>set_tipped_status<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/tipped_mob, new_status) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L201"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 201"></a></aside></h3><p>Toggles our tipped status between tipped or untipped (TRUE or FALSE)
|
||
also handles rotating our mob and adding immobilization traits</p>
|
||
<p>tipped_mob - the mob we're setting to tipped or untipped
|
||
new_status - the tipped status we're setting the mob to - TRUE for tipped, FALSE for untipped</p><h3 id="proc/try_tip"><aside class="declaration">proc </aside>try_tip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/tipped_mob, /<a href="mob.html">mob</a>/tipper) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L79"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 79"></a></aside></h3><p>Try to tip over [tipped_mob].
|
||
If the mob is dead, or optional callback returns a value, or our do-after fails, we don't tip the mob.
|
||
Otherwise, upon completing of the do_after, tip over the mob.</p>
|
||
<p>tipped_mob - the mob being tipped over
|
||
tipper - the mob tipping the tipped_mob</p><h3 id="proc/try_untip"><aside class="declaration">proc </aside>try_untip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/tipped_mob, /<a href="mob.html">mob</a>/untipper) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/tippable.dm#L138"><img src="git.png" width="16" height="16" title="code/datums/components/tippable.dm 138"></a></aside></h3><p>Try to untip a mob that has been tipped.
|
||
After a do-after is completed, we untip the mob.</p>
|
||
<p>tipped_mob - the mob who is tipped
|
||
untipper - the mob who is untipping the tipped_mob</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> |