BandaStation - Modules - TypesDefine Details

code/__DEFINES/surgery.dm

IS_ORGANIC_ORGANHelper to figure out if an organ is organic
IS_ROBOTIC_ORGANHelper to figure out if an organ is robotic
ORGAN_ORGANICOrganic organs, the default. Don't get affected by EMPs.
ORGAN_ROBOTICSynthetic organs, or cybernetic organs. Reacts to EMPs and don't deteriorate or heal
ORGAN_MINERALMineral organs. Snowflakey.
ORGAN_FROZENFrozen organs, don't deteriorate
ORGAN_FAILINGFailing organs perform damaging effects until replaced or fixed, and typically they don't function properly either
ORGAN_EMPSynthetic organ affected by an EMP. Deteriorates over time.
ORGAN_VITALCurrently only the brain - Removing this organ KILLS the owner
ORGAN_EDIBLECan be eaten
ORGAN_UNREMOVABLECan't be removed using surgery or other common means
ORGAN_HIDDENCan't be seen by scanners, doesn't anger body purists
ORGAN_VIRGINHas the organ already been inserted inside someone
ORGAN_PROMINENTALWAYS show this when scanned by advanced scanners, even if it is totally healthy
ORGAN_HAZARDOUSAn organ that is ostensibly dangerous when inside a body
ORGAN_EXTERNALThis is an external organ, not an inner one. Used in several checks.
ORGAN_GHOSTThis is a ghost organ, which can be used for wall phasing.
ORGAN_MUTANTThis is a mutant organ, having this makes you a -derived mutant to health analyzers.
ORGAN_UNUSABLEThe organ has been chomped or otherwise rendered unusable.
ORGAN_TYPE_FLAGSOrgan flags that correspond to bodytypes
RIGHT_EYE_SCARScarring on the right eye
LEFT_EYE_SCARScarring on the left eye
IS_ORGANIC_LIMBHelper to figure out if a limb is organic
IS_ROBOTIC_LIMBHelper to figure out if a limb is robotic
IS_PEG_LIMBHelper to figure out if a limb is a peg limb
BODYPART_UNREMOVABLEBodypart cannot be dismembered or amputated
BODYPART_PSEUDOPARTBodypart is a pseudopart (like a chainsaw arm)
BODYPART_IMPLANTEDBodypart did not match the owner's default bodypart limb_id when surgically implanted
BODYPART_UNHUSKABLEBodypart never displays as a husk
BODYPART_VIRGINBodypart has never been added to a mob
BP_BLOCK_CHANGE_SPECIESBodypart does not get replaced during set_species()
HEAD_HAIRHead can have hair
HEAD_FACIAL_HAIRHead can have facial hair
HEAD_LIPSHead can have lips
HEAD_EYESPRITESHead can have eye sprites
HEAD_EYECOLORHead will have colored eye sprites
HEAD_EYEHOLESHead can have eyeholes when missing eyes
HEAD_DEBRAINHead can have debrain overlay
HEAD_NO_DISFIGUREHead will never be disfigured by damage
HEAD_DEFAULT_FEATURESDefault for most heads
IS_LYING_OR_CANNOT_LIEChecks if the mob is lying down if they can lie down, otherwise always passes
OPERATION_AFFECTS_MOODApplies moodlets after the surgical operation is complete
OPERATION_NOTABLENotable operations are specially logged and also leave memories
OPERATION_LOOPINGOperation will automatically repeat until it can no longer be performed
OPERATION_MORBIDGrants a speed bonus if the user is morbid and their tool is morbid
OPERATION_LOCKEDNot innately available to doctors, must be added via COMSIG_MOB_ATTEMPT_SURGERY to show up
OPERATION_SELF_OPERABLEA surgeon can perform this operation on themselves
OPERATION_STANDING_ALLOWEDOperation can be performed on standing patients - note: mobs that cannot lie down are always considered lying down for surgery
OPERATION_ALWAYS_FAILABLESome traits may cause operations to be infalliable - this flag disables that behavior, always allowing it to be failed
OPERATION_IGNORE_CLOTHESIf set, the operation will ignore clothing when checking for access to the target body part.
OPERATION_PRIORITY_NEXT_STEPThis operation should be prioritized as the next step in a surgery sequence. (In the operating computer it will flash red)
OPERATION_MECHANICOperation is a mechanic / robotic surgery
OPERATION_NO_WIKIHides the operation from autowiki generation
IGNORED_OPERATION_CLOTHING_SLOTSAll of these equipment slots are ignored when checking for clothing coverage during surgery
IMPLEMENT_HANDDummy "tool" for surgeries which use hands
SURGERY_MODIFIER_FAILURE_THRESHOLDSurgery speed modifiers are soft-capped at this value The actual modifier can exceed this but it gets
FAILURE_CHANCE_PER_SECONDThere is an x percent chance of failure per second beyond 2.5x the base surgery time
GET_FAILURE_CHANCECalculates failure chance of an operation based on the base time and the effective speed modifier This may look something like: Base time 1 second and 4x effective multiplier -> 4 seconds - 2.5 seconds = 1.5 seconds * 10 = 15% failure chance Or: Base time 2 seconds and 1x effective multiplier -> 2 seconds - 5 seconds = -3 seconds * 10 = -30% failure chance (clamped to 0%)
OPERATION_SPEEDTotal speed/failure modifier applied to the operation
OPERATION_ACTIONThe action being performed, simply "default" for 95% of surgeries
OPERATION_FORCE_FAILWhether the operation should automatically fail
OPERATION_TARGET_ZONEThe body zone being targeted by the operation
OPERATION_TARGETThe specific target of the operation, usually a bodypart or organ, generally redundant

Define Details

BODYPART_IMPLANTED

Bodypart did not match the owner's default bodypart limb_id when surgically implanted

BODYPART_PSEUDOPART

Bodypart is a pseudopart (like a chainsaw arm)

BODYPART_UNHUSKABLE

Bodypart never displays as a husk

BODYPART_UNREMOVABLE

Bodypart cannot be dismembered or amputated

BODYPART_VIRGIN

Bodypart has never been added to a mob

BP_BLOCK_CHANGE_SPECIES

Bodypart does not get replaced during set_species()

FAILURE_CHANCE_PER_SECOND

There is an x percent chance of failure per second beyond 2.5x the base surgery time

GET_FAILURE_CHANCE

Calculates failure chance of an operation based on the base time and the effective speed modifier This may look something like: Base time 1 second and 4x effective multiplier -> 4 seconds - 2.5 seconds = 1.5 seconds * 10 = 15% failure chance Or: Base time 2 seconds and 1x effective multiplier -> 2 seconds - 5 seconds = -3 seconds * 10 = -30% failure chance (clamped to 0%)

HEAD_DEBRAIN

Head can have debrain overlay

HEAD_DEFAULT_FEATURES

Default for most heads

HEAD_EYECOLOR

Head will have colored eye sprites

HEAD_EYEHOLES

Head can have eyeholes when missing eyes

HEAD_EYESPRITES

Head can have eye sprites

HEAD_FACIAL_HAIR

Head can have facial hair

HEAD_HAIR

Head can have hair

HEAD_LIPS

Head can have lips

HEAD_NO_DISFIGURE

Head will never be disfigured by damage

IGNORED_OPERATION_CLOTHING_SLOTS

All of these equipment slots are ignored when checking for clothing coverage during surgery

IMPLEMENT_HAND

Dummy "tool" for surgeries which use hands

IS_LYING_OR_CANNOT_LIE

Checks if the mob is lying down if they can lie down, otherwise always passes

IS_ORGANIC_LIMB

Helper to figure out if a limb is organic

IS_ORGANIC_ORGAN

Helper to figure out if an organ is organic

IS_PEG_LIMB

Helper to figure out if a limb is a peg limb

IS_ROBOTIC_LIMB

Helper to figure out if a limb is robotic

IS_ROBOTIC_ORGAN

Helper to figure out if an organ is robotic

LEFT_EYE_SCAR

Scarring on the left eye

OPERATION_ACTION

The action being performed, simply "default" for 95% of surgeries

OPERATION_AFFECTS_MOOD

Applies moodlets after the surgical operation is complete

OPERATION_ALWAYS_FAILABLE

Some traits may cause operations to be infalliable - this flag disables that behavior, always allowing it to be failed

OPERATION_FORCE_FAIL

Whether the operation should automatically fail

OPERATION_IGNORE_CLOTHES

If set, the operation will ignore clothing when checking for access to the target body part.

OPERATION_LOCKED

Not innately available to doctors, must be added via COMSIG_MOB_ATTEMPT_SURGERY to show up

OPERATION_LOOPING

Operation will automatically repeat until it can no longer be performed

OPERATION_MECHANIC

Operation is a mechanic / robotic surgery

OPERATION_MORBID

Grants a speed bonus if the user is morbid and their tool is morbid

OPERATION_NOTABLE

Notable operations are specially logged and also leave memories

OPERATION_NO_WIKI

Hides the operation from autowiki generation

OPERATION_PRIORITY_NEXT_STEP

This operation should be prioritized as the next step in a surgery sequence. (In the operating computer it will flash red)

OPERATION_SELF_OPERABLE

A surgeon can perform this operation on themselves

OPERATION_SPEED

Total speed/failure modifier applied to the operation

OPERATION_STANDING_ALLOWED

Operation can be performed on standing patients - note: mobs that cannot lie down are always considered lying down for surgery

OPERATION_TARGET

The specific target of the operation, usually a bodypart or organ, generally redundant

OPERATION_TARGET_ZONE

The body zone being targeted by the operation

ORGAN_EDIBLE

Can be eaten

ORGAN_EMP

Synthetic organ affected by an EMP. Deteriorates over time.

ORGAN_EXTERNAL

This is an external organ, not an inner one. Used in several checks.

ORGAN_FAILING

Failing organs perform damaging effects until replaced or fixed, and typically they don't function properly either

ORGAN_FROZEN

Frozen organs, don't deteriorate

ORGAN_GHOST

This is a ghost organ, which can be used for wall phasing.

ORGAN_HAZARDOUS

An organ that is ostensibly dangerous when inside a body

ORGAN_HIDDEN

Can't be seen by scanners, doesn't anger body purists

ORGAN_MINERAL

Mineral organs. Snowflakey.

ORGAN_MUTANT

This is a mutant organ, having this makes you a -derived mutant to health analyzers.

ORGAN_ORGANIC

Organic organs, the default. Don't get affected by EMPs.

ORGAN_PROMINENT

ALWAYS show this when scanned by advanced scanners, even if it is totally healthy

ORGAN_ROBOTIC

Synthetic organs, or cybernetic organs. Reacts to EMPs and don't deteriorate or heal

ORGAN_TYPE_FLAGS

Organ flags that correspond to bodytypes

ORGAN_UNREMOVABLE

Can't be removed using surgery or other common means

ORGAN_UNUSABLE

The organ has been chomped or otherwise rendered unusable.

ORGAN_VIRGIN

Has the organ already been inserted inside someone

ORGAN_VITAL

Currently only the brain - Removing this organ KILLS the owner

RIGHT_EYE_SCAR

Scarring on the right eye

SURGERY_MODIFIER_FAILURE_THRESHOLD

Surgery speed modifiers are soft-capped at this value The actual modifier can exceed this but it gets