Files

5 lines
6.9 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/element/ridable - 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/element/ridable.html#var">Var Details</a> - <a href="datum/element/ridable.html#proc">Proc Details</a></header><main><h1>ridable <aside>/<a href="datum.html">datum</a>/<a href="datum/element.html">element</a>/<a href="datum/element/ridable.html">ridable</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 9"></a></h1><p>This element is used to indicate that a movable atom can be mounted by mobs in order to ride it. The movable is considered mounted when a mob is buckled to it,
at which point a <a href="datum/component/riding.html" title="/datum/component/riding">riding component</a> is created on the movable, and that component handles the actual riding behavior.</p>
<p>Besides the target, the ridable element has one argument: the component subtype. This is not really ideal since there's ~20-30 component subtypes rather than
having the behavior defined on the ridable atoms themselves or some such, but because the old riding behavior was so horrifyingly spread out and redundant,
just having the variables, behavior, and procs be standardized is still a big improvement.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/element/ridable.html#var/potion_boosted">potion_boosted</a></th><td>If we have a xenobio red potion applied to us, we get split off so we can pass our special status onto new riding components</td></tr><tr><th><a href="datum/element/ridable.html#var/riding_component_type">riding_component_type</a></th><td>The specific riding component subtype we're loading our instructions from, don't leave this as default please!</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/element/ridable.html#proc/check_mounting">check_mounting</a></th><td>Someone is buckling to this movable, which is literally the only thing we care about (other than speed potions)</td></tr><tr><th><a href="datum/element/ridable.html#proc/check_potion">check_potion</a></th><td>Checks to see if we've been hit with a red xenobio potion to make us faster. This is only registered if we're a vehicle</td></tr><tr><th><a href="datum/element/ridable.html#proc/equip_buckle_inhands">equip_buckle_inhands</a></th><td>Try putting the appropriate number of <a href="obj/item.html" title="/obj/item">riding offhand items</a> into the target's hands, return FALSE if we can't</td></tr><tr><th><a href="datum/element/ridable.html#proc/unequip_buckle_inhands">unequip_buckle_inhands</a></th><td>Remove all of the relevant <a href="obj/item.html" title="/obj/item">riding offhand items</a> from the target</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/potion_boosted"><aside class="declaration">var </aside>potion_boosted <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L15"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 15"></a></h3><p>If we have a xenobio red potion applied to us, we get split off so we can pass our special status onto new riding components</p><h3 id="var/riding_component_type"><aside class="declaration">var </aside>riding_component_type <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L13"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 13"></a></h3><p>The specific riding component subtype we're loading our instructions from, don't leave this as default please!</p><h2 id="proc">Proc Details</h2><h3 id="proc/check_mounting"><aside class="declaration">proc </aside>check_mounting<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/target_movable, /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/potential_rider, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L42"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 42"></a></aside></h3><p>Someone is buckling to this movable, which is literally the only thing we care about (other than speed potions)</p><h3 id="proc/check_potion"><aside class="declaration">proc </aside>check_potion<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/ridable_atom, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/slimepotion/speed/speed_potion, /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L112"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 112"></a></aside></h3><p>Checks to see if we've been hit with a red xenobio potion to make us faster. This is only registered if we're a vehicle</p><h3 id="proc/equip_buckle_inhands"><aside class="declaration">proc </aside>equip_buckle_inhands<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/user, amount_required, /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/target_movable, riding_target_override) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L74"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 74"></a></aside></h3><p>Try putting the appropriate number of <a href="obj/item.html" title="/obj/item">riding offhand items</a> into the target's hands, return FALSE if we can't</p><h3 id="proc/unequip_buckle_inhands"><aside class="declaration">proc </aside>unequip_buckle_inhands<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/user, /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/target_movable) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/elements/ridable.dm#L137"><img src="git.png" width="16" height="16" title="code/datums/elements/ridable.dm 137"></a></aside></h3><p>Remove all of the relevant <a href="obj/item.html" title="/obj/item">riding offhand items</a> from the target</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>