mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
18 lines
15 KiB
HTML
18 lines
15 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/defib - 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/defib.html#var">Var Details</a> - <a href="datum/component/defib.html#proc">Proc Details</a></header><main><h1>defib <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/defib.html">defib</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L7"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 7"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/defib.html#var/actual_unit_uid">actual_unit_uid</a></th><td>uid to an item that should be making noise and handling things that our direct parent shouldn't be concerned with.</td></tr><tr><th><a href="datum/component/defib.html#var/busy">busy</a></th><td>If the defib is actively performing a defib cycle</td></tr><tr><th><a href="datum/component/defib.html#var/charge_sound">charge_sound</a></th><td>Sound for defib windup.</td></tr><tr><th><a href="datum/component/defib.html#var/combat">combat</a></th><td>If it should penetrate space suits</td></tr><tr><th><a href="datum/component/defib.html#var/cooldown">cooldown</a></th><td>Cooldown length for this defib in deciseconds</td></tr><tr><th><a href="datum/component/defib.html#var/emag_proof">emag_proof</a></th><td>If true, this cannot be emagged.</td></tr><tr><th><a href="datum/component/defib.html#var/emp_proof">emp_proof</a></th><td>If true, EMPs will have no effect.</td></tr><tr><th><a href="datum/component/defib.html#var/fail_sound">fail_sound</a></th><td>Sound when the defib fails.</td></tr><tr><th><a href="datum/component/defib.html#var/heart_attack_chance">heart_attack_chance</a></th><td>If combat is true, this determines whether or not it should always cause a heart attack.</td></tr><tr><th><a href="datum/component/defib.html#var/on_cooldown">on_cooldown</a></th><td>Whether or not we're currently on cooldown</td></tr><tr><th><a href="datum/component/defib.html#var/robotic">robotic</a></th><td>If this is being used by a borg or not, with necessary safeties applied if so.</td></tr><tr><th><a href="datum/component/defib.html#var/safety">safety</a></th><td>Whether the safeties are enabled or not</td></tr><tr><th><a href="datum/component/defib.html#var/safety_off_sound">safety_off_sound</a></th><td>Sound when the defib's safety is disabled.</td></tr><tr><th><a href="datum/component/defib.html#var/safety_on_sound">safety_on_sound</a></th><td>Sound when the defib's safety is enabled.</td></tr><tr><th><a href="datum/component/defib.html#var/speed_multiplier">speed_multiplier</a></th><td>How fast the defib should work.</td></tr><tr><th><a href="datum/component/defib.html#var/success_sound">success_sound</a></th><td>Sound when the defib is successful.</td></tr><tr><th><a href="datum/component/defib.html#var/zap_sound">zap_sound</a></th><td>Sound when the defib shocks the patient.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/defib.html#proc/Initialize">Initialize</a></th><td>Create a new defibrillation component.</td></tr><tr><th><a href="datum/component/defib.html#proc/defibrillate">defibrillate</a></th><td>Perform a defibrillation.</td></tr><tr><th><a href="datum/component/defib.html#proc/fibrillate">fibrillate</a></th><td>Inflict stamina loss (and possibly inflict cardiac arrest) on someone.</td></tr><tr><th><a href="datum/component/defib.html#proc/get_effect_target">get_effect_target</a></th><td>Get the "parent" that effects (emags, EMPs) should be applied onto.</td></tr><tr><th><a href="datum/component/defib.html#proc/trigger_defib">trigger_defib</a></th><td>Start the defibrillation process when triggered by a signal.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/actual_unit_uid"><aside class="declaration">var </aside>actual_unit_uid <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L29"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 29"></a></h3><p>uid to an item that should be making noise and handling things that our direct parent shouldn't be concerned with.</p><h3 id="var/busy"><aside class="declaration">var </aside>busy <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L17"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 17"></a></h3><p>If the defib is actively performing a defib cycle</p><h3 id="var/charge_sound"><aside class="declaration">var </aside>charge_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L31"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 31"></a></h3><p>Sound for defib windup.</p><h3 id="var/combat"><aside class="declaration">var </aside>combat <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L11"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 11"></a></h3><p>If it should penetrate space suits</p><h3 id="var/cooldown"><aside class="declaration">var </aside>cooldown <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L19"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 19"></a></h3><p>Cooldown length for this defib in deciseconds</p><h3 id="var/emag_proof"><aside class="declaration">var </aside>emag_proof <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L27"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 27"></a></h3><p>If true, this cannot be emagged.</p><h3 id="var/emp_proof"><aside class="declaration">var </aside>emp_proof <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L25"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 25"></a></h3><p>If true, EMPs will have no effect.</p><h3 id="var/fail_sound"><aside class="declaration">var </aside>fail_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L35"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 35"></a></h3><p>Sound when the defib fails.</p><h3 id="var/heart_attack_chance"><aside class="declaration">var </aside>heart_attack_chance <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L13"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 13"></a></h3><p>If combat is true, this determines whether or not it should always cause a heart attack.</p><h3 id="var/on_cooldown"><aside class="declaration">var </aside>on_cooldown <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L21"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 21"></a></h3><p>Whether or not we're currently on cooldown</p><h3 id="var/robotic"><aside class="declaration">var </aside>robotic <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 9"></a></h3><p>If this is being used by a borg or not, with necessary safeties applied if so.</p><h3 id="var/safety"><aside class="declaration">var </aside>safety <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L15"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 15"></a></h3><p>Whether the safeties are enabled or not</p><h3 id="var/safety_off_sound"><aside class="declaration">var </aside>safety_off_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L41"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 41"></a></h3><p>Sound when the defib's safety is disabled.</p><h3 id="var/safety_on_sound"><aside class="declaration">var </aside>safety_on_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L39"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 39"></a></h3><p>Sound when the defib's safety is enabled.</p><h3 id="var/speed_multiplier"><aside class="declaration">var </aside>speed_multiplier <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L23"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 23"></a></h3><p>How fast the defib should work.</p><h3 id="var/success_sound"><aside class="declaration">var </aside>success_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L33"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 33"></a></h3><p>Sound when the defib is successful.</p><h3 id="var/zap_sound"><aside class="declaration">var </aside>zap_sound <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L37"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 37"></a></h3><p>Sound when the defib shocks the patient.</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>(robotic, cooldown, speed_multiplier, combat, heart_attack_chance, safe_by_default, emp_proof, emag_proof, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/actual_unit) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L57"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 57"></a></aside></h3><p>Create a new defibrillation component.</p>
|
|
<p>Arguments:</p>
|
|
<ul>
|
|
<li>robotic - whether this should be treated like a borg module.</li>
|
|
<li>cooldown - Minimum time possible between shocks.</li>
|
|
<li>speed_multiplier - Speed multiplier for defib do-afters.</li>
|
|
<li>combat - If true, the defib can zap through hardsuits.</li>
|
|
<li>heart_attack_chance - If combat and safeties are off, the % chance for this to cause a heart attack on harm intent.</li>
|
|
<li>safe_by_default - If true, safety will be enabled by default.</li>
|
|
<li>emp_proof - If true, safety won't be switched by emp. Note that the device itself can still have behavior from it, it's just that the component will not.</li>
|
|
<li>emag_proof - If true, safety won't be switched by emag. Note that the device itself can still have behavior from it, it's just that the component will not.</li>
|
|
<li>actual_unit - Unit which the component's parent is based from, such as a large defib unit or a borg. The actual_unit will make the sounds and be the "origin" of visible messages, among other things.</li>
|
|
</ul><h3 id="proc/defibrillate"><aside class="declaration">proc </aside>defibrillate<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/user, /<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>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L130"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 130"></a></aside></h3><p>Perform a defibrillation.</p><h3 id="proc/fibrillate"><aside class="declaration">proc </aside>fibrillate<aside>(/<a href="mob.html">mob</a>/user, /<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>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L348"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 348"></a></aside></h3><p>Inflict stamina loss (and possibly inflict cardiac arrest) on someone.</p>
|
|
<p>Arguments:</p>
|
|
<ul>
|
|
<li>user - wielder of the defib</li>
|
|
<li>target - person getting shocked</li>
|
|
</ul><h3 id="proc/get_effect_target"><aside class="declaration">proc </aside>get_effect_target<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L82"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 82"></a></aside></h3><p>Get the "parent" that effects (emags, EMPs) should be applied onto.</p><h3 id="proc/trigger_defib"><aside class="declaration">proc </aside>trigger_defib<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/paddles, /<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>/target, /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/user) <a href="https://github.com/ParadiseSS13/Paradise/blob/edee60476d21ee840643bd1abe7f6003a8c65773/code/datums/components/defibrillator.dm#L121"><img src="git.png" width="16" height="16" title="code/datums/components/defibrillator.dm 121"></a></aside></h3><p>Start the defibrillation process when triggered by a signal.</p></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> |