Files
GS13NG/datum/component/embedded.html
2025-02-05 06:19:18 +00:00

8 lines
9.6 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/embedded - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/component/embedded.html#var">Var Details</a> - <a href="datum/component/embedded.html#proc">Proc Details</a></header><main><h1>embedded <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/embedded.html">embedded</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L32"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 32"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/embedded.html#var/harmful">harmful</a></th><td>if both our pain multiplier and jostle pain multiplier are 0, we're harmless and can omit most of the damage related stuff</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/embedded.html#proc/Topic">Topic</a></th><td>Someone is ripping out the item from the turf by hand</td></tr><tr><th><a href="datum/component/embedded.html#proc/byeItemCarbon">byeItemCarbon</a></th><td>Something deleted or moved our weapon while it was embedded, how rude!</td></tr><tr><th><a href="datum/component/embedded.html#proc/fallOutCarbon">fallOutCarbon</a></th><td>Called when then item randomly falls out of a carbon. This handles the damage and descriptors, then calls safe_remove()</td></tr><tr><th><a href="datum/component/embedded.html#proc/initCarbon">initCarbon</a></th><td>//////////HUMAN PROCS////////////////</td></tr><tr><th><a href="datum/component/embedded.html#proc/initTurf">initTurf</a></th><td>///////////TURF PROCS////////////////</td></tr><tr><th><a href="datum/component/embedded.html#proc/itemMoved">itemMoved</a></th><td>This proc handles if something knocked the invisible item loose from the turf somehow (probably an explosion). Just make it visible and say it fell loose, then get outta here.</td></tr><tr><th><a href="datum/component/embedded.html#proc/jostleCheck">jostleCheck</a></th><td>Called every time a carbon with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the carbon is crawling or walking.</td></tr><tr><th><a href="datum/component/embedded.html#proc/processCarbon">processCarbon</a></th><td>Items embedded/stuck to carbons both check whether they randomly fall out (if applicable), as well as if the target mob and limb still exists.
Items harmfully embedded in carbons have an additional check for random pain (if applicable)</td></tr><tr><th><a href="datum/component/embedded.html#proc/ripOutCarbon">ripOutCarbon</a></th><td>Called when a carbon with an object embedded/stuck to them inspects themselves and clicks the appropriate link to begin ripping the item out. This handles the ripping attempt, descriptors, and dealing damage, then calls safe_remove()</td></tr><tr><th><a href="datum/component/embedded.html#proc/safeRemoveCarbon">safeRemoveCarbon</a></th><td>This proc handles the final step and actual removal of an embedded/stuck item from a carbon, whether or not it was actually removed safely.
Pass TRUE for to_hands if we want it to go to the victim's hands when they pull it out</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/harmful"><aside class="declaration">var </aside>harmful <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L52"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 52"></a></h3><p>if both our pain multiplier and jostle pain multiplier are 0, we're harmless and can omit most of the damage related stuff</p><h2 id="proc">Proc Details</h2><h3 id="proc/Topic"><aside class="parent"><a title="/datum" href="datum.html#proc/Topic"></a></aside>Topic<aside>(/<a href="datum.html">datum</a>/source, href_list) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L355"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 355"></a></aside></h3><p>Someone is ripping out the item from the turf by hand</p><h3 id="proc/byeItemCarbon"><aside class="declaration">proc </aside>byeItemCarbon<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L251"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 251"></a></aside></h3><p>Something deleted or moved our weapon while it was embedded, how rude!</p><h3 id="proc/fallOutCarbon"><aside class="declaration">proc </aside>fallOutCarbon<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L176"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 176"></a></aside></h3><p>Called when then item randomly falls out of a carbon. This handles the damage and descriptors, then calls safe_remove()</p><h3 id="proc/initCarbon"><aside class="declaration">proc </aside>initCarbon<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L132"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 132"></a></aside></h3><p>//////////HUMAN PROCS////////////////</p>
<p>Set up an instance of embedding for a carbon. This is basically an extension of Initialize() so not much to say</p><h3 id="proc/initTurf"><aside class="declaration">proc </aside>initTurf<aside>(/<a href="datum.html">datum</a>/<a href="datum/thrownthing.html">thrownthing</a>/throwingdatum) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L301"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 301"></a></aside></h3><p>///////////TURF PROCS////////////////</p>
<p>Turfs are much lower maintenance, since we don't care if they're in pain, but since they don't bleed or scream, we draw an overlay to show their status.
The only difference pointy/sticky items make here is text descriptors and pointy objects making a spark shower on impact.</p><h3 id="proc/itemMoved"><aside class="declaration">proc </aside>itemMoved<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L370"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 370"></a></aside></h3><p>This proc handles if something knocked the invisible item loose from the turf somehow (probably an explosion). Just make it visible and say it fell loose, then get outta here.</p><h3 id="proc/jostleCheck"><aside class="declaration">proc </aside>jostleCheck<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L159"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 159"></a></aside></h3><p>Called every time a carbon with a harmful embed moves, rolling a chance for the item to cause pain. The chance is halved if the carbon is crawling or walking.</p><h3 id="proc/processCarbon"><aside class="declaration">proc </aside>processCarbon<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L267"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 267"></a></aside></h3><p>Items embedded/stuck to carbons both check whether they randomly fall out (if applicable), as well as if the target mob and limb still exists.
Items harmfully embedded in carbons have an additional check for random pain (if applicable)</p><h3 id="proc/ripOutCarbon"><aside class="declaration">proc </aside>ripOutCarbon<aside>(/<a href="datum.html">datum</a>/source, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/I, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/bodypart.html">bodypart</a>/limb) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L192"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 192"></a></aside></h3><p>Called when a carbon with an object embedded/stuck to them inspects themselves and clicks the appropriate link to begin ripping the item out. This handles the ripping attempt, descriptors, and dealing damage, then calls safe_remove()</p><h3 id="proc/safeRemoveCarbon"><aside class="declaration">proc </aside>safeRemoveCarbon<aside>(to_hands) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/components/embedded.dm#L218"><img src="git.png" width="16" height="16" title="code/datums/components/embedded.dm 218"></a></aside></h3><p>This proc handles the final step and actual removal of an embedded/stuck item from a carbon, whether or not it was actually removed safely.
Pass TRUE for to_hands if we want it to go to the victim's hands when they pull it out</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>