- type: entity
  id: SurgeryBase
  categories:
  - HideSpawnMenu

- type: entity
  parent: SurgeryBase
  id: SurgeryOpenIncision
  name: Open Incision
  components:
  - type: Surgery
    priority: -100
    steps:
    - SurgeryStepOpenIncisionScalpel
    - SurgeryStepClampBleeders
    - SurgeryStepRetractSkin
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC

- type: entity
  parent: SurgeryOpenIncision
  id: SurgeryOpenIncisionSlime
  components:
  - type: Surgery
    priority: -100
    steps:
    - SurgeryStepOpenIncisionScalpel
    - SurgeryStepCoagulateJellyFlow
    - SurgeryStepRetractMembrane
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson

- type: entity
  parent: SurgeryBase
  id: SurgeryCloseIncision
  name: Close Incision
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    priority: 100
    steps:
    - SurgeryStepCloseBones
    - SurgeryStepMendRibcage
    - SurgeryStepCloseIncision
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso

- type: entity
  parent: SurgeryCloseIncision
  id: SurgeryCloseIncisionHead
  name: Close Incision
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    priority: 100
    steps:
    - SurgeryStepRejoinBloodVessels
    - SurgeryStepMendSkull
    - SurgeryStepCloseIncision
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Head

- type: entity
  parent: SurgeryCloseIncision
  id: SurgeryCloseIncisionLimb
  name: Close Incision
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    priority: 100
    steps:
    - SurgeryStepRejoinBloodVessels
    - SurgeryStepRestoreCartilage
    - SurgeryStepCloseIncision
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Arm
    - Leg
    - Hand
    - Foot

- type: entity
  parent: SurgeryCloseIncision
  id: SurgeryCloseIncisionSlime
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncisionSlime
    priority: 100
    steps:
    - SurgeryStepMendSlime
    - SurgeryStepCloseIncision
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson

- type: entity
  parent: SurgeryCloseIncision
  id: SurgeryCloseIncisionSlimeHead
  name: Close Incision
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncisionSlime
    priority: 100
    steps:
    - SurgeryStepMendSlime
    - SurgeryStepCloseIncision
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
  - type: SurgeryPartCondition
    parts:
    - Head

- type: entity
  parent: SurgeryCloseIncision
  id: SurgeryCloseIncisionLimbSlime
  name: Close Incision
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncisionSlime
    priority: 100
    steps:
    - SurgeryStepMendSlime
    - SurgeryStepCloseIncision
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
  - type: SurgeryPartCondition
    parts:
    - Arm
    - Leg
    - Hand
    - Foot

- type: entity
  parent: SurgeryBase
  id: SurgeryOpenRibcage
  name: Open Ribcage
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    priority: -50
    steps:
    - SurgeryStepSawBones
    - SurgeryStepPriseOpenBones
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: Sprite
    sprite: Mobs/Species/Skeleton/parts.rsi
    state: torso_m

- type: entity
  parent: SurgeryBase
  id: SurgeryOpenAbdomen
  name: Open Abdomen
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    priority: -50
    steps:
    - SurgeryStepCutAbdominalMuscles
    - SurgeryStepRetractAbdominalWalls
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: Mobs/Species/Human/parts.rsi
    state: torso_m

- type: entity
  parent: SurgeryBase
  id: SurgeryEliminateVocalCordDefects
  name: Eliminate vocal cord defects
  description: Remove speech defects, accents.
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepExposeVocalCords
    - SurgeryStepAdjustVocalCords
    - SurgeryStepSutureIncision
  - type: SurgeryAnyAccentCondition
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: Objects/Fun/Instruments/microphone.rsi
    state: icon


#organs

- type: entity
  parent: SurgeryBase
  id: SurgeryExtractLiver
  name: Extract Liver
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateLiver
    - SurgeryStepClampLiverVessels
    - SurgeryStepRemoveLiver
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganLiver
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: liver

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantLiver
  name: Implant Liver
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPrepareImplantSiteLiver
    - SurgeryStepInsertLiver
    - SurgeryStepConnectLiverVessels
    - SurgeryStepRestoreAbdominalWalls
    - SurgeryStepSutureMuscles
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganLiver
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: liver
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractAppendix
  name: Extract Appendix
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateAppendix
    - SurgeryStepClampAppendix
    - SurgeryStepRemoveAppendix
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganAppendix
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: appendix
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractKidneys
  name: Extract Kidneys
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateKidneys
    - SurgeryStepClampKidneysVessels
    - SurgeryStepRemoveKidneys
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganKidneys
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: kidney-l
      - state: kidney-r

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantKidneys
  name: Implant Kidneys
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPrepareImplantSiteKidneys
    - SurgeryStepInsertKidneys
    - SurgeryStepConnectKidneysVessels
    - SurgeryStepRestoreAbdominalWalls
    - SurgeryStepSutureMuscles
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganKidneys
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: kidney-l
      - state: kidney-r
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractStomach
  name: Extract Stomach
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateStomach
    - SurgeryStepClampStomachVessels
    - SurgeryStepRemoveStomach
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganStomach
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: stomach

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantStomach
  name: Implant Stomach
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPrepareImplantSiteStomach
    - SurgeryStepInsertStomach
    - SurgeryStepConnectStomachVessels
    - SurgeryStepRestoreAbdominalWalls
    - SurgeryStepSutureMuscles
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganStomach
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: stomach
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractLungs
  name: Extract Lungs
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenRibcage
    steps:
    - SurgeryStepLocateLungs
    - SurgeryStepClampLungVessels
    - SurgeryStepRemoveLungs
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganLungs
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: lung-l
      - state: lung-r

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantLungs
  name: Implant Lungs
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenRibcage
    steps:
    - SurgeryStepPrepareImplantSiteLungs
    - SurgeryStepInsertLungs
    - SurgeryStepConnectLungVessels
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganLungs
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: lung-l
      - state: lung-r

- type: entity
  parent: SurgeryBase
  id: SurgeryExtractLungsSlime
  name: Extract Lungs
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateLungs
    - SurgeryStepClampLungVessels
    - SurgeryStepRemoveLungs
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganLungs
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: lung-l
      - state: lung-r

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantLungsSlime
  name: Implant Lungs
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPrepareImplantSiteLungs
    - SurgeryStepInsertLungs
    - SurgeryStepConnectLungVessels
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganLungs
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: lung-l
      - state: lung-r
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractHeart
  name: Extract Heart
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenRibcage
    steps:
    - SurgeryStepLocateHeart
    - SurgeryStepClampHeartVessels
    - SurgeryStepRemoveHeart
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganHeart
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: heart-on

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantHeart
  name: Implant Heart
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenRibcage
    steps:
    - SurgeryStepPrepareImplantSiteHeart
    - SurgeryStepInsertHeart
    - SurgeryStepConnectHeartVessels
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganHeart
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: heart-on
#
- type: entity
  parent: SurgeryExtractHeart
  id: SurgeryExtractHeartSlime
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateHeart
    - SurgeryStepClampHeartVessels
    - SurgeryStepRemoveHeart
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganHeart
  - type: Sprite
    sprite: Mobs/Species/Slime/organs.rsi
    state: heart-on

- type: entity
  parent: SurgeryImplantHeart
  id: SurgeryImplantHeartSlime
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPrepareImplantSiteHeart
    - SurgeryStepInsertHeart
    - SurgeryStepConnectHeartVessels
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganHeart
  - type: Sprite
    sprite: Mobs/Species/Slime/organs.rsi
    state: heart-on
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractEyes
  name: Extract Eyes
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepLocateEyes
    - SurgeryStepClampOpticNerve
    - SurgeryStepRemoveEyes
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganEyes
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: eyeball-l
      - state: eyeball-r

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantEyes
  name: Implant Eyes
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepPrepareImplantSiteEyes
    - SurgeryStepInsertEyes
    - SurgeryStepConnectOpticNerve
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganEyes
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    layers:
      - state: eyeball-l
      - state: eyeball-r
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractEyeImplant
  name: Extract Eye Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepLocateImplant
    - SurgeryStepClampOpticNerve
    - SurgeryStepRemoveEyeImplant
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganExistCondition
    organ:
    - type: EyeImplant
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: eye_implant_welding

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantEyeImplant
  name: Implant Eye Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepPrepareImplantSiteEyes
    - SurgeryStepInsertEyeImplant
    - SurgeryStepConnectOpticNerve
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: EyeImplant
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: eye_implant_welding

#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractHandImplant
  name: Extract Hand Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepLocateImplant
    - SurgeryStepExposeNerves
    - SurgeryStepRemoveHandImplant
  - type: SurgeryPartCondition
    parts:
    - Hand
  - type: SurgeryOrganExistCondition
    organ:
    - type: HandImplant
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: hand_implant_insulated

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantHandImplant
  name: Implant Hand Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    - SurgeryOpenIncisionSlime
    steps:
    - SurgeryStepPrepareImplantSiteHand
    - SurgeryStepInsertHandImplant
    - SurgeryStepRejoinNerves
  - type: SurgeryPartCondition
    parts:
    - Hand
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: HandImplant
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: hand_implant_insulated

#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractBrainImplant
  name: Extract Brain Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    steps:
    - SurgeryStepPreparePatient
    - SurgeryStepShaveHead
    - SurgeryStepDisinfectScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepDrillBurrHoles
    - SurgeryStepCutSkull
    - SurgeryStepRemoveBoneFlap
    - SurgeryStepClampDuraMater
    - SurgeryStepInciseDuraMater
    - SurgeryStepRetractDuraMater
    - SurgeryStepSeverCranialNerves
    - SurgeryStepRemoveBrainImplant
    - SurgeryStepReconnectCranialNerves
    - SurgeryStepReplaceDuraMater
    - SurgeryStepSealDuraMater
    - SurgeryStepReplaceBoneFlap
    - SurgeryStepSecureBoneFlap
    - SurgeryStepReplaceScalp
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganExistCondition
    organ:
    - type: BrainImplant
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: brain_implant_translator

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantBrainImplant
  name: Implant Brain Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    steps:
    - SurgeryStepCleanImplantSite
    - SurgeryStepPrepareScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepDrillBurrHoles
    - SurgeryStepCutSkull
    - SurgeryStepRemoveBoneFlap
    - SurgeryStepPrepareDuraMater
    - SurgeryStepInciseDuraMater
    - SurgeryStepRetractDuraMater
    - SurgeryStepInsertBrainImplant
    - SurgeryStepReconnectCranialNerves
    - SurgeryStepReplaceDuraMater
    - SurgeryStepSealDuraMater
    - SurgeryStepReplaceBoneFlap
    - SurgeryStepSecureBoneFlap
    - SurgeryStepReplaceScalp
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: BrainImplant
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: brain_implant_translator

- type: entity
  parent: SurgeryBase
  id: SurgeryExtractBrainImplantSlime
  name: Extract Core Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPreparePatient
    - SurgeryStepDisinfectScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepRemoveBrainImplant
    - SurgeryStepReplaceScalp
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: BrainImplant
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: brain_implant_translator

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantBrainImplantSlime
  name: Implant Core Implant
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepCleanImplantSite
    - SurgeryStepPrepareScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepInsertBrainImplant
    - SurgeryStepReplaceScalp
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: BrainImplant
  - type: Sprite
    sprite: _Starlight/Objects/Specific/Medical/implants.rsi
    layers:
      - state: brain_implant_translator


#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractTongue
  name: Extract Tongue
  components:
  - type: Surgery
    steps:
    - SurgeryStepGrabTongue
    - SurgeryStepCutTongue
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganTongue
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: tongue

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantTongue
  name: Implant Tongue
  components:
  - type: Surgery
    steps:
    - SurgeryStepPrepareImplantSiteTongue
    - SurgeryStepPositionTongue
    - SurgeryStepAttachTongue
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganTongue
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - IPC
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: tongue
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractBrain
  name: Extract Brain
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    steps:
    - SurgeryStepPreparePatient
    - SurgeryStepShaveHead
    - SurgeryStepDisinfectScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepDrillBurrHoles
    - SurgeryStepCutSkull
    - SurgeryStepRemoveBoneFlap
    - SurgeryStepClampDuraMater
    - SurgeryStepInciseDuraMater
    - SurgeryStepRetractDuraMater
    - SurgeryStepSeverCranialNerves
    - SurgeryStepExtractBrain
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganBrain
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: brain

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantBrain
  name: Implant Brain
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenIncision
    steps:
    - SurgeryStepCleanImplantSite
    - SurgeryStepPrepareScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepDrillBurrHoles
    - SurgeryStepCutSkull
    - SurgeryStepRemoveBoneFlap
    - SurgeryStepPrepareDuraMater
    - SurgeryStepInciseDuraMater
    - SurgeryStepRetractDuraMater
    - SurgeryStepInsertBrain
    - SurgeryStepReconnectCranialNerves
    - SurgeryStepReplaceDuraMater
    - SurgeryStepSealDuraMater
    - SurgeryStepReplaceBoneFlap
    - SurgeryStepSecureBoneFlap
    - SurgeryStepReplaceScalp
    - SurgeryStepSutureScalp
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Head
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganBrain
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
    state: brain

#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractCore
  name: Extract Core
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPreparePatient
    - SurgeryStepDisinfectScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepExtractBrain
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganBrain
  - type: Sprite
    sprite: Mobs/Species/Slime/organs.rsi
    state: brain

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantCore
  name: Implant Core
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepCleanImplantSite
    - SurgeryStepPrepareScalp
    - SurgeryStepMakeIncisionScalp
    - SurgeryStepRetractScalp
    - SurgeryStepInsertBrain
    - SurgeryStepReplaceScalp
    - SurgeryStepSutureScalp
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - SlimePerson
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganBrain
  - type: Sprite
    sprite: Mobs/Species/Slime/organs.rsi
    state: brain
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractEgg
  name: Extract Egg
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepRemoveEgg
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryHasCompCondition
    component:
    - type: HasEggHolder
  - type: Sprite
    sprite:  _Starlight/Interface/Actions/actions_spider.rsi
    layers:
      - state: lay_eggs
#
- type: entity
  parent: SurgeryBase
  id: SurgeryExtractCavityItem
  name: Extract Item
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepLocateItemCavity
    - SurgeryStepRemoveItemCavity
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: Item
    container: cavity
  - type: Sprite
    sprite: Mobs/Species/Human/parts.rsi
    state: torso_m

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantCavityItem
  name: Implant Item
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenAbdomen
    steps:
    - SurgeryStepPrepareImplantSiteCavity
    - SurgeryStepInsertItemCavity
  - type: SurgerySpeciesCondition
    speciesBlacklist:
    - SlimePerson
    - IPC
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: Item
    container: cavity
  - type: Sprite
    sprite: Mobs/Species/Human/parts.rsi
    state: torso_m

- type: entity
  parent: SurgeryBase
  id: SurgeryShadekinCore
  name: Extract Core
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenRibcage
    steps:
    - SurgeryStepPreparePatient
    - SurgeryStepLocateCore
    - SurgeryStepClampShadekinCoreVessels
    - SurgeryStepExtractShadekinCore
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - Shadekin
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganExistCondition
    organ:
    - type: OrganShadekinCore
  - type: Sprite
    sprite: _Starlight/Mobs/Species/Shadekin/organs.rsi
    state: core

- type: entity
  parent: SurgeryBase
  id: SurgeryImplantShadekinCore
  name: Implant Core
  components:
  - type: Surgery
    requirement:
    - SurgeryOpenRibcage
    steps:
    - SurgeryStepCleanImplantSite
    - SurgeryStepInsertShadekinCore
    - SurgeryStepConnectShadekinCoreVessels
  - type: SurgerySpeciesCondition
    speciesBlacklist: []
    speciesWhitelist:
    - Shadekin
  - type: SurgeryPartCondition
    parts:
    - Torso
  - type: SurgeryOrganDontExistCondition
    organ:
    - type: OrganShadekinCore
  - type: Sprite
    sprite: _Starlight/Mobs/Species/Shadekin/organs.rsi
    state: core
