Files

26 lines
17 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/component/two_handed - 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/two_handed.html#var">Var Details</a> - <a href="datum/component/two_handed.html#proc">Proc Details</a></header><main><h1>two_handed <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/two_handed.html">two_handed</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 9"></a></h1><p>Two Handed Component</p>
<p>When applied to an item it will make it two handed</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/two_handed.html#var/attacksound">attacksound</a></th><td>Play sound on attack when wielded</td></tr><tr><th><a href="datum/component/two_handed.html#var/force_multiplier">force_multiplier</a></th><td>The multiplier applied to force when wielded, does not work with force_wielded, and force_unwielded</td></tr><tr><th><a href="datum/component/two_handed.html#var/force_unwielded">force_unwielded</a></th><td>The force of the item when unweilded</td></tr><tr><th><a href="datum/component/two_handed.html#var/force_wielded">force_wielded</a></th><td>The force of the item when weilded</td></tr><tr><th><a href="datum/component/two_handed.html#var/icon_wielded">icon_wielded</a></th><td>The icon that will be used when wielded</td></tr><tr><th><a href="datum/component/two_handed.html#var/offhand_item">offhand_item</a></th><td>Reference to the offhand created for the item</td></tr><tr><th><a href="datum/component/two_handed.html#var/only_sharp_when_wielded">only_sharp_when_wielded</a></th><td>Whether or not the object is only sharp when wielded. If it's never sharp, ignore this.</td></tr><tr><th><a href="datum/component/two_handed.html#var/require_twohands">require_twohands</a></th><td>Does it have to be held in both hands</td></tr><tr><th><a href="datum/component/two_handed.html#var/sharpened_increase">sharpened_increase</a></th><td>The amount of increase recived from sharpening the item</td></tr><tr><th><a href="datum/component/two_handed.html#var/unwield_callback">unwield_callback</a></th><td>A callback on the parent to be called when the item is unwielded</td></tr><tr><th><a href="datum/component/two_handed.html#var/unwieldsound">unwieldsound</a></th><td>Play sound when unwielded</td></tr><tr><th><a href="datum/component/two_handed.html#var/wield_callback">wield_callback</a></th><td>A callback on the parent to be called when the item is wielded</td></tr><tr><th><a href="datum/component/two_handed.html#var/wielded">wielded</a></th><td>Are we holding the two handed item properly</td></tr><tr><th><a href="datum/component/two_handed.html#var/wieldsound">wieldsound</a></th><td>Play sound when wielded</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/two_handed.html#proc/Initialize">Initialize</a></th><td>Two Handed component</td></tr><tr><th><a href="datum/component/two_handed.html#proc/check_unwielded">check_unwielded</a></th><td>Check if item is unwielded</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_attack_self">on_attack_self</a></th><td>Triggered on attack self of the item containing the component</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_destroy">on_destroy</a></th><td>Triggered on destroy of the component's offhand</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_drop">on_drop</a></th><td>Triggered on drop of item containing the component</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_equip">on_equip</a></th><td>Triggered on equip of the item containing the component</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_moved">on_moved</a></th><td>on_moved Triggers on item moved</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_sharpen">on_sharpen</a></th><td>on_sharpen Triggers on usage of a sharpening stone on the item</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_swapping_hands">on_swapping_hands</a></th><td>on_swap_hands Triggers on swapping hands, blocks swap if the other hand is busy</td></tr><tr><th><a href="datum/component/two_handed.html#proc/on_update_icon">on_update_icon</a></th><td>on_update_icon triggers on call to update parent items icon</td></tr><tr><th><a href="datum/component/two_handed.html#proc/unwield">unwield</a></th><td>Unwield the two handed item</td></tr><tr><th><a href="datum/component/two_handed.html#proc/wield">wield</a></th><td>Wield the two handed item in both hands</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/attacksound"><aside class="declaration">var </aside>attacksound <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L24"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 24"></a></h3><p>Play sound on attack when wielded</p><h3 id="var/force_multiplier"><aside class="declaration">var </aside>force_multiplier <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 14"></a></h3><p>The multiplier applied to force when wielded, does not work with force_wielded, and force_unwielded</p><h3 id="var/force_unwielded"><aside class="declaration">var </aside>force_unwielded <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 18"></a></h3><p>The force of the item when unweilded</p><h3 id="var/force_wielded"><aside class="declaration">var </aside>force_wielded <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 16"></a></h3><p>The force of the item when weilded</p><h3 id="var/icon_wielded"><aside class="declaration">var </aside>icon_wielded <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L28"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 28"></a></h3><p>The icon that will be used when wielded</p><h3 id="var/offhand_item"><aside class="declaration">var </aside>offhand_item <aside> /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/offhand</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L30"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 30"></a></h3><p>Reference to the offhand created for the item</p><h3 id="var/only_sharp_when_wielded"><aside class="declaration">var </aside>only_sharp_when_wielded <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L38"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 38"></a></h3><p>Whether or not the object is only sharp when wielded. If it's never sharp, ignore this.</p><h3 id="var/require_twohands"><aside class="declaration">var </aside>require_twohands <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L26"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 26"></a></h3><p>Does it have to be held in both hands</p><h3 id="var/sharpened_increase"><aside class="declaration">var </aside>sharpened_increase <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L32"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 32"></a></h3><p>The amount of increase recived from sharpening the item</p><h3 id="var/unwield_callback"><aside class="declaration">var </aside>unwield_callback <aside> /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L36"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 36"></a></h3><p>A callback on the parent to be called when the item is unwielded</p><h3 id="var/unwieldsound"><aside class="declaration">var </aside>unwieldsound <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L22"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 22"></a></h3><p>Play sound when unwielded</p><h3 id="var/wield_callback"><aside class="declaration">var </aside>wield_callback <aside> /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L34"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 34"></a></h3><p>A callback on the parent to be called when the item is wielded</p><h3 id="var/wielded"><aside class="declaration">var </aside>wielded <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 12"></a></h3><p>Are we holding the two handed item properly</p><h3 id="var/wieldsound"><aside class="declaration">var </aside>wieldsound <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L20"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 20"></a></h3><p>Play sound when wielded</p><h2 id="proc">Proc Details</h2><h3 id="proc/Initialize"><aside class="parent"><a title="/datum/component" href="datum/component.html#proc/Initialize"></a></aside>Initialize<aside>(require_twohands, wieldsound, unwieldsound, attacksound, force_multiplier, force_wielded, force_unwielded, icon_wielded, only_sharp_when_wielded, /<a href="datum.html">datum</a>/callback/wield_callback, /<a href="datum.html">datum</a>/callback/unwield_callback) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L55"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 55"></a></aside></h3><p>Two Handed component</p>
<p>vars:</p>
<ul>
<li>require_twohands (optional) Does the item need both hands to be carried</li>
<li>wieldsound (optional) The sound to play when wielded</li>
<li>unwieldsound (optional) The sound to play when unwielded</li>
<li>attacksound (optional) The sound to play when wielded and attacking</li>
<li>force_multiplier (optional) The force multiplier when wielded, do not use with force_wielded, and force_unwielded</li>
<li>force_wielded (optional) The force setting when the item is wielded, do not use with force_multiplier</li>
<li>force_unwielded (optional) The force setting when the item is unwielded, do not use with force_multiplier</li>
<li>icon_wielded (optional) The icon to be used when wielded</li>
<li>only_sharp_when_wielded (optional) Is the item only sharp when held in both hands?</li>
</ul><h3 id="proc/check_unwielded"><aside class="declaration">proc </aside>check_unwielded<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L321"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 321"></a></aside></h3><p>Check if item is unwielded</p>
<p>returns TRUE if unwielded</p><h3 id="proc/on_attack_self"><aside class="declaration">proc </aside>on_attack_self<aside>(/<a href="datum.html">datum</a>/source, /<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L153"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 153"></a></aside></h3><p>Triggered on attack self of the item containing the component</p><h3 id="proc/on_destroy"><aside class="declaration">proc </aside>on_destroy<aside>(/<a href="datum.html">datum</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L147"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 147"></a></aside></h3><p>Triggered on destroy of the component's offhand</p><h3 id="proc/on_drop"><aside class="declaration">proc </aside>on_drop<aside>(/<a href="datum.html">datum</a>/source, /<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L135"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 135"></a></aside></h3><p>Triggered on drop of item containing the component</p><h3 id="proc/on_equip"><aside class="declaration">proc </aside>on_equip<aside>(/<a href="datum.html">datum</a>/source, /<a href="mob.html">mob</a>/user, slot) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L126"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 126"></a></aside></h3><p>Triggered on equip of the item containing the component</p><h3 id="proc/on_moved"><aside class="declaration">proc </aside>on_moved<aside>(/<a href="datum.html">datum</a>/source, /<a href="mob.html">mob</a>/user, dir) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L342"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 342"></a></aside></h3><p>on_moved Triggers on item moved</p><h3 id="proc/on_sharpen"><aside class="declaration">proc </aside>on_sharpen<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/item, amount, max_amount) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L361"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 361"></a></aside></h3><p>on_sharpen Triggers on usage of a sharpening stone on the item</p><h3 id="proc/on_swapping_hands"><aside class="declaration">proc </aside>on_swapping_hands<aside>(/<a href="mob.html">mob</a>/user, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/held_item) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L350"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 350"></a></aside></h3><p>on_swap_hands Triggers on swapping hands, blocks swap if the other hand is busy</p><h3 id="proc/on_update_icon"><aside class="declaration">proc </aside>on_update_icon<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L330"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 330"></a></aside></h3><p>on_update_icon triggers on call to update parent items icon</p>
<p>Updates the icon using icon_wielded if set</p><h3 id="proc/unwield"><aside class="declaration">proc </aside>unwield<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/user, show_message, can_drop) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L249"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 249"></a></aside></h3><p>Unwield the two handed item</p>
<p>vars:</p>
<ul>
<li>user The mob/living/carbon that is unwielding the item</li>
<li>show_message (option) show a message to chat on unwield</li>
<li>can_drop (option) whether 'dropItemToGround' can be called or not.</li>
</ul><h3 id="proc/wield"><aside class="declaration">proc </aside>wield<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="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/two_handed.dm#L175"><img src="git.png" width="16" height="16" title="code/datums/components/two_handed.dm 175"></a></aside></h3><p>Wield the two handed item in both hands</p>
<p>vars:</p>
<ul>
<li>user The mob/living/carbon that is wielding the item</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>