Files
Paradise/datum/surgery.html

16 lines
18 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/surgery - 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/surgery.html#var">Var Details</a> - <a href="datum/surgery.html#proc">Proc Details</a></header><main><h1>surgery <aside>/<a href="datum.html">datum</a>/<a href="datum/surgery.html">surgery</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L4"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 4"></a></h1><p>Datum Surgery Helpers</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/surgery.html#var/abstract">abstract</a></th><td>Whether or not this should be a selectable surgery at all</td></tr><tr><th><a href="datum/surgery.html#var/can_cancel">can_cancel</a></th><td>Whether this surgery can be stopped after the first step with a cautery</td></tr><tr><th><a href="datum/surgery.html#var/cancel_on_organ_change">cancel_on_organ_change</a></th><td>Whether this surgery should be cancelled when an organ change happens. (removed if requires bodypart, or added if doesn't require bodypart)</td></tr><tr><th><a href="datum/surgery.html#var/desc">desc</a></th><td>Description of the surgery</td></tr><tr><th><a href="datum/surgery.html#var/germ_prevention_quality">germ_prevention_quality</a></th><td>How likely it should be for the surgery to cause infection: 0-1</td></tr><tr><th><a href="datum/surgery.html#var/ignore_clothes">ignore_clothes</a></th><td>Whether you need to remove clothes to perform the surgery</td></tr><tr><th><a href="datum/surgery.html#var/location">location</a></th><td>Location of the surgery</td></tr><tr><th><a href="datum/surgery.html#var/lying_required">lying_required</a></th><td>Does the victim (patient) need to be lying down?</td></tr><tr><th><a href="datum/surgery.html#var/name">name</a></th><td>Name of the surgery</td></tr><tr><th><a href="datum/surgery.html#var/organ_to_manipulate">organ_to_manipulate</a></th><td>Body part the surgery is currently being performed on. Useful for checking to see if the organ desired is still in the body after the surgery has begun.</td></tr><tr><th><a href="datum/surgery.html#var/possible_locs">possible_locs</a></th><td>Body locations this surgery can be performed on</td></tr><tr><th><a href="datum/surgery.html#var/replaced_by">replaced_by</a></th><td>Don't show this surgery if this type exists. Set to /datum/surgery if you want to hide a &quot;base&quot; surgery.</td></tr><tr><th><a href="datum/surgery.html#var/requires_bodypart">requires_bodypart</a></th><td>Surgery is only available if the target bodypart is present (or if it's missing)</td></tr><tr><th><a href="datum/surgery.html#var/requires_organic_bodypart">requires_organic_bodypart</a></th><td>Whether we can perform the surgery on a robotic limb</td></tr><tr><th><a href="datum/surgery.html#var/requires_real_bodypart">requires_real_bodypart</a></th><td>Some surgeries might work on limbs that don't really exist (like chainsaw arms or flashlight eyes)</td></tr><tr><th><a href="datum/surgery.html#var/self_operable">self_operable</a></th><td>Can the surgery be performed on yourself?</td></tr><tr><th><a href="datum/surgery.html#var/speed_modifier">speed_modifier</a></th><td>Surgery step speed modifier</td></tr><tr><th><a href="datum/surgery.html#var/step_in_progress">step_in_progress</a></th><td>If we're currently performing a step</td></tr><tr><th><a href="datum/surgery.html#var/step_number">step_number</a></th><td>How far along we are in a surgery being performed.</td></tr><tr><th><a href="datum/surgery.html#var/steps">steps</a></th><td>Surgical steps that go into performing this procedure</td></tr><tr><th><a href="datum/surgery.html#var/target">target</a></th><td>Target of the surgery</td></tr><tr><th><a href="datum/surgery.html#var/target_mobtypes">target_mobtypes</a></th><td>Mobs on which this can be performed</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/surgery.html#proc/New">New</a></th><td>Create a new surgery.</td></tr><tr><th><a href="datum/surgery.html#proc/can_start">can_start</a></th><td>Whether or not we can start this surgery.
If this returns FALSE, this surgery won't show up in the list.</td></tr><tr><th><a href="datum/surgery.html#proc/get_surgery_next_step">get_surgery_next_step</a></th><td>Get the next step in the current surgery, or null if we're on the last one.</td></tr><tr><th><a href="datum/surgery.html#proc/get_surgery_step">get_surgery_step</a></th><td>Get the current surgery step we're on</td></tr><tr><th><a href="datum/surgery.html#proc/handle_organ_state_change">handle_organ_state_change</a></th><td>Handle an organ's insertion or removal mid-surgery.
If cancel_on_organ_change is true, then this will cancel the surgery in certain cases.</td></tr><tr><th><a href="datum/surgery.html#proc/is_organ_compatible">is_organ_compatible</a></th><td>Get whether the target organ is compatible with the current surgery.</td></tr><tr><th><a href="datum/surgery.html#proc/next_step">next_step</a></th><td>Try to perform the next step in the current operation.
This gets called in the attack chain, and as such returning FALSE in here means that the target
will be hit with whatever's in your hand.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/abstract"><aside class="declaration">var </aside>abstract <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L44"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 44"></a></h3><p>Whether or not this should be a selectable surgery at all</p><h3 id="var/can_cancel"><aside class="declaration">var </aside>can_cancel <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L14"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 14"></a></h3><p>Whether this surgery can be stopped after the first step with a cautery</p><h3 id="var/cancel_on_organ_change"><aside class="declaration">var </aside>cancel_on_organ_change <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L46"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 46"></a></h3><p>Whether this surgery should be cancelled when an organ change happens. (removed if requires bodypart, or added if doesn't require bodypart)</p><h3 id="var/desc"><aside class="declaration">var </aside>desc <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L8"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 8"></a></h3><p>Description of the surgery</p><h3 id="var/germ_prevention_quality"><aside class="declaration">var </aside>germ_prevention_quality <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L48"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 48"></a></h3><p>How likely it should be for the surgery to cause infection: 0-1</p><h3 id="var/ignore_clothes"><aside class="declaration">var </aside>ignore_clothes <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L22"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 22"></a></h3><p>Whether you need to remove clothes to perform the surgery</p><h3 id="var/location"><aside class="declaration">var </aside>location <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L18"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 18"></a></h3><p>Location of the surgery</p><h3 id="var/lying_required"><aside class="declaration">var </aside>lying_required <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L32"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 32"></a></h3><p>Does the victim (patient) need to be lying down?</p><h3 id="var/name"><aside class="declaration">var </aside>name <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L6"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 6"></a></h3><p>Name of the surgery</p><h3 id="var/organ_to_manipulate"><aside class="declaration">var </aside>organ_to_manipulate <aside> /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/organ.html">organ</a>/<a href="obj/item/organ/external.html">external</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L42"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 42"></a></h3><p>Body part the surgery is currently being performed on. Useful for checking to see if the organ desired is still in the body after the surgery has begun.</p><h3 id="var/possible_locs"><aside class="declaration">var </aside>possible_locs <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L24"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 24"></a></h3><p>Body locations this surgery can be performed on</p><h3 id="var/replaced_by"><aside class="declaration">var </aside>replaced_by <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L36"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 36"></a></h3><p>Don't show this surgery if this type exists. Set to /datum/surgery if you want to hide a &quot;base&quot; surgery.</p><h3 id="var/requires_bodypart"><aside class="declaration">var </aside>requires_bodypart <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L26"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 26"></a></h3><p>Surgery is only available if the target bodypart is present (or if it's missing)</p><h3 id="var/requires_organic_bodypart"><aside class="declaration">var </aside>requires_organic_bodypart <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L20"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 20"></a></h3><p>Whether we can perform the surgery on a robotic limb</p><h3 id="var/requires_real_bodypart"><aside class="declaration">var </aside>requires_real_bodypart <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L30"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 30"></a></h3><p>Some surgeries might work on limbs that don't really exist (like chainsaw arms or flashlight eyes)</p><h3 id="var/self_operable"><aside class="declaration">var </aside>self_operable <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L34"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 34"></a></h3><p>Can the surgery be performed on yourself?</p><h3 id="var/speed_modifier"><aside class="declaration">var </aside>speed_modifier <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L28"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 28"></a></h3><p>Surgery step speed modifier</p><h3 id="var/step_in_progress"><aside class="declaration">var </aside>step_in_progress <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L16"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 16"></a></h3><p>If we're currently performing a step</p><h3 id="var/step_number"><aside class="declaration">var </aside>step_number <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L10"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 10"></a></h3><p>How far along we are in a surgery being performed.</p><h3 id="var/steps"><aside class="declaration">var </aside>steps <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L12"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 12"></a></h3><p>Surgical steps that go into performing this procedure</p><h3 id="var/target"><aside class="declaration">var </aside>target <aside> /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L40"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 40"></a></h3><p>Target of the surgery</p><h3 id="var/target_mobtypes"><aside class="declaration">var </aside>target_mobtypes <aside> /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L38"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 38"></a></h3><p>Mobs on which this can be performed</p><h2 id="proc">Proc Details</h2><h3 id="proc/New">New<aside>(/<a href="atom.html">atom</a>/surgery_target, surgery_location, surgery_bodypart) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L58"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 58"></a></aside></h3><p>Create a new surgery.</p>
<p>Arguments:</p>
<ul>
<li>surgery_target - The atom the target is being performed on.</li>
<li>surgery_location - The body zone that the surgery is being performed on.</li>
<li>surgery_bodypart - The body part that the surgery is being performed on.</li>
</ul><h3 id="proc/can_start"><aside class="declaration">proc </aside>can_start<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>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L93"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 93"></a></aside></h3><p>Whether or not we can start this surgery.
If this returns FALSE, this surgery won't show up in the list.</p><h3 id="proc/get_surgery_next_step"><aside class="declaration">proc </aside>get_surgery_next_step<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L143"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 143"></a></aside></h3><p>Get the next step in the current surgery, or null if we're on the last one.</p><h3 id="proc/get_surgery_step"><aside class="declaration">proc </aside>get_surgery_step<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L136"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 136"></a></aside></h3><p>Get the current surgery step we're on</p><h3 id="proc/handle_organ_state_change"><aside class="declaration">proc </aside>handle_organ_state_change<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/organ_owner, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/organ.html">organ</a>/<a href="obj/item/organ/external.html">external</a>/organ, insert) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L159"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 159"></a></aside></h3><p>Handle an organ's insertion or removal mid-surgery.
If cancel_on_organ_change is true, then this will cancel the surgery in certain cases.</p><h3 id="proc/is_organ_compatible"><aside class="declaration">proc </aside>is_organ_compatible<aside>(/<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/<a href="obj/item/organ.html">organ</a>/<a href="obj/item/organ/external.html">external</a>/affecting) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L83"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 83"></a></aside></h3><p>Get whether the target organ is compatible with the current surgery.</p><h3 id="proc/next_step"><aside class="declaration">proc </aside>next_step<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>/target) <a href="https://github.com/ParadiseSS13/Paradise/blob/776b9861f70566b1e6a0763a465ef22f7920a3d6/code/modules/surgery/surgery.dm#L106"><img src="git.png" width="16" height="16" title="code/modules/surgery/surgery.dm 106"></a></aside></h3><p>Try to perform the next step in the current operation.
This gets called in the attack chain, and as such returning FALSE in here means that the target
will be hit with whatever's in your hand.</p>
<p>The return is passed to the attack chain, so return TRUE to stop any sort of afterattack.</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/776b9861f70566b1e6a0763a465ef22f7920a3d6">776b986</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>