surgery
Datum Surgery Helpers
Vars | |
abstract | Whether or not this should be a selectable surgery at all |
---|---|
can_cancel | Whether this surgery can be stopped after the first step with a cautery |
cancel_on_organ_change | Whether this surgery should be cancelled when an organ change happens. (removed if requires bodypart, or added if doesn't require bodypart) |
desc | Description of the surgery |
germ_prevention_quality | How likely it should be for the surgery to cause infection: 0-1 |
ignore_clothes | Whether you need to remove clothes to perform the surgery |
location | Location of the surgery |
lying_required | Does the victim (patient) need to be lying down? |
name | Name of the surgery |
organ_to_manipulate | 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. |
possible_locs | Body locations this surgery can be performed on |
replaced_by | Don't show this surgery if this type exists. Set to /datum/surgery if you want to hide a "base" surgery. |
requires_bodypart | Surgery is only available if the target bodypart is present (or if it's missing) |
requires_organic_bodypart | Whether we can perform the surgery on a robotic limb |
requires_real_bodypart | Some surgeries might work on limbs that don't really exist (like chainsaw arms or flashlight eyes) |
self_operable | Can the surgery be performed on yourself? |
speed_modifier | Surgery step speed modifier |
started_with_drapes | Whether the surgery was started with drapes. |
step_in_progress | If we're currently performing a step |
step_number | How far along we are in a surgery being performed. |
steps | Surgical steps that go into performing this procedure |
target | Target of the surgery |
target_mobtypes | Mobs on which this can be performed |
Procs | |
can_start | Whether or not we can start this surgery. If this returns FALSE, this surgery won't show up in the list. |
get_surgery_next_step | Get the next step in the current surgery, or null if we're on the last one. |
get_surgery_step | Get the current surgery step we're on |
handle_organ_state_change | 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. |
is_organ_compatible | Get whether the target organ is compatible with the current surgery. |
next_step | 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. |
Var Details
abstract
Whether or not this should be a selectable surgery at all
can_cancel
Whether this surgery can be stopped after the first step with a cautery
cancel_on_organ_change
Whether this surgery should be cancelled when an organ change happens. (removed if requires bodypart, or added if doesn't require bodypart)
desc
Description of the surgery
germ_prevention_quality
How likely it should be for the surgery to cause infection: 0-1
ignore_clothes
Whether you need to remove clothes to perform the surgery
location
Location of the surgery
lying_required
Does the victim (patient) need to be lying down?
name
Name of the surgery
organ_to_manipulate
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.
possible_locs
Body locations this surgery can be performed on
replaced_by
Don't show this surgery if this type exists. Set to /datum/surgery if you want to hide a "base" surgery.
requires_bodypart
Surgery is only available if the target bodypart is present (or if it's missing)
requires_organic_bodypart
Whether we can perform the surgery on a robotic limb
requires_real_bodypart
Some surgeries might work on limbs that don't really exist (like chainsaw arms or flashlight eyes)
self_operable
Can the surgery be performed on yourself?
speed_modifier
Surgery step speed modifier
started_with_drapes
Whether the surgery was started with drapes.
step_in_progress
If we're currently performing a step
step_number
How far along we are in a surgery being performed.
steps
Surgical steps that go into performing this procedure
target
Target of the surgery
target_mobtypes
Mobs on which this can be performed
Proc Details
can_start
Whether or not we can start this surgery. If this returns FALSE, this surgery won't show up in the list.
get_surgery_next_step
Get the next step in the current surgery, or null if we're on the last one.
get_surgery_step
Get the current surgery step we're on
handle_organ_state_change
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.
is_organ_compatible
Get whether the target organ is compatible with the current surgery.
next_step
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.
The return is passed to the attack chain, so return TRUE to stop any sort of afterattack.