Files
Paradise/obj/item/bio_chip.html

25 lines
10 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>/obj/item/bio_chip - 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="obj/item/bio_chip.html#var">Var Details</a> - <a href="obj/item/bio_chip.html#proc">Proc Details</a></header><main><h1>Implants <aside>/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/bio_chip.html">bio_chip</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L7"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 7"></a></h1><p>Code for implants that can be inserted into a person and have some sort of passive or triggered action.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="obj/item/bio_chip.html#var/activated">activated</a></th><td>How the implant is activated.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/allow_multiple">allow_multiple</a></th><td>Whether multiple implants of this same type can be inserted into someone.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/has_triggered_on_death">has_triggered_on_death</a></th><td>Whether this implant has already triggered on death or not, to prevent it firing multiple times.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/imp_in">imp_in</a></th><td>Who the implant is inside of.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/implant_data">implant_data</a></th><td>the implant_fluff datum attached to this implant, purely cosmetic &quot;lore&quot; information</td></tr><tr><th><a href="obj/item/bio_chip.html#var/implant_state">implant_state</a></th><td>which implant overlay should be used for implant cases. This should point to a state in bio_chips.dmi</td></tr><tr><th><a href="obj/item/bio_chip.html#var/implanted">implanted</a></th><td>Whether the implant is implanted. Null if it's never been inserted, TRUE if it's currently inside someone, or FALSE if it's been removed.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/trigger_causes">trigger_causes</a></th><td>What type of action will trigger this emote. Bitfield of IMPLANT_EMOTE_* defines.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/trigger_emotes">trigger_emotes</a></th><td>List of emote keys that activate this implant when used.</td></tr><tr><th><a href="obj/item/bio_chip.html#var/uses">uses</a></th><td>Amount of times that the implant can be triggered by the user. If the implant can't be used, it can't be inserted.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="obj/item/bio_chip.html#proc/can_implant">can_implant</a></th><td>Check that we can actually implant this before implanting it</td></tr><tr><th><a href="obj/item/bio_chip.html#proc/implant">implant</a></th><td>Try to implant ourselves into a mob.</td></tr><tr><th><a href="obj/item/bio_chip.html#proc/removed">removed</a></th><td>Clean up when an implant is removed.</td></tr><tr><th><a href="obj/item/bio_chip.html#proc/set_trigger">set_trigger</a></th><td>Set the emote that will trigger the implant.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/activated"><aside class="declaration">var </aside>activated <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L18"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 18"></a></h3><p>How the implant is activated.</p><h3 id="var/allow_multiple"><aside class="declaration">var </aside>allow_multiple <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L25"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 25"></a></h3><p>Whether multiple implants of this same type can be inserted into someone.</p><h3 id="var/has_triggered_on_death"><aside class="declaration">var </aside>has_triggered_on_death <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L34"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 34"></a></h3><p>Whether this implant has already triggered on death or not, to prevent it firing multiple times.</p><h3 id="var/imp_in"><aside class="declaration">var </aside>imp_in <aside> /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L22"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 22"></a></h3><p>Who the implant is inside of.</p><h3 id="var/implant_data"><aside class="declaration">var </aside>implant_data <aside> /<a href="datum.html">datum</a>/implant_fluff</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L37"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 37"></a></h3><p>the implant_fluff datum attached to this implant, purely cosmetic &quot;lore&quot; information</p><h3 id="var/implant_state"><aside class="declaration">var </aside>implant_state <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L16"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 16"></a></h3><p>which implant overlay should be used for implant cases. This should point to a state in bio_chips.dmi</p><h3 id="var/implanted"><aside class="declaration">var </aside>implanted <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L20"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 20"></a></h3><p>Whether the implant is implanted. Null if it's never been inserted, TRUE if it's currently inside someone, or FALSE if it's been removed.</p><h3 id="var/trigger_causes"><aside class="declaration">var </aside>trigger_causes <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L32"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 32"></a></h3><p>What type of action will trigger this emote. Bitfield of IMPLANT_EMOTE_* defines.</p><h3 id="var/trigger_emotes"><aside class="declaration">var </aside>trigger_emotes <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L30"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 30"></a></h3><p>List of emote keys that activate this implant when used.</p><h3 id="var/uses"><aside class="declaration">var </aside>uses <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L27"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 27"></a></h3><p>Amount of times that the implant can be triggered by the user. If the implant can't be used, it can't be inserted.</p><h2 id="proc">Proc Details</h2><h3 id="proc/can_implant"><aside class="declaration">proc </aside>can_implant<aside>(/<a href="mob.html">mob</a>/source, /<a href="mob.html">mob</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L196"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 196"></a></aside></h3><p>Check that we can actually implant this before implanting it</p>
<ul>
<li>source - The person being implanted</li>
<li>user - The person doing the implanting</li>
</ul>
<p>Returns
TRUE - I could care less, implant it, maybe don't. I don't care.
FALSE - Don't implant!</p><h3 id="proc/implant"><aside class="declaration">proc </aside>implant<aside>(/<a href="mob.html">mob</a>/source, /<a href="mob.html">mob</a>/user, force) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L145"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 145"></a></aside></h3><p>Try to implant ourselves into a mob.</p>
<ul>
<li>source - The person the implant is being administered to.</li>
<li>user - The person who is doing the implanting.</li>
</ul>
<p>Returns
1 if the implant injects successfully
-1 if the implant fails to inject
0 if there's no room for the implant.</p><h3 id="proc/removed"><aside class="declaration">proc </aside>removed<aside>(/<a href="mob.html">mob</a>/source) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L204"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 204"></a></aside></h3><p>Clean up when an implant is removed.</p>
<ul>
<li>source - the user who the implant was removed from.</li>
</ul><h3 id="proc/set_trigger"><aside class="declaration">proc </aside>set_trigger<aside>(/<a href="mob.html">mob</a>/user, emote_key, on_implant, silent) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/game/objects/items/bio_chips/bio_chip.dm#L63"><img src="git.png" width="16" height="16" title="code/game/objects/items/bio_chips/bio_chip.dm 63"></a></aside></h3><p>Set the emote that will trigger the implant.</p>
<ul>
<li>user - User who is trying to associate the implant to themselves.</li>
<li>emote_key - Key of the emote that should trigger the implant.</li>
<li>on_implant - Whether this proc is being called during the implantation of the implant.</li>
<li>silent - If true, the user won't get any to_chat messages if an implantation fails.</li>
</ul></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/edee60476d21ee840643bd1abe7f6003a8c65773">edee604</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>