# SPDX-FileCopyrightText: 2020 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 GlassEclipse <32942106+GlassEclipse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 GlassEclipse <tsymall5@gmail.com>
# SPDX-FileCopyrightText: 2020 Hugo Laloge <hugo.laloge@gmail.com>
# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2021 ColdAutumnRain <73938872+ColdAutumnRain@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Fortune117 <fortune11709@gmail.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Jaskanbe <86671825+Jaskanbe@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Kara Dinyes <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 Leon Friedrich <60421075+leonsfriedrich@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Leon Friedrich <leonsfriedrich@gmail.com>
# SPDX-FileCopyrightText: 2021 Michael Will <will_m@outlook.de>
# SPDX-FileCopyrightText: 2021 Paul <ritter.paul1+git@googlemail.com>
# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2021 SETh lafuente <cetaciocascarudo@gmail.com>
# SPDX-FileCopyrightText: 2021 ScalyChimp <72841710+scaly-chimp@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 SethLafuente <84478872+SethLafuente@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Silver <Silvertorch5@gmail.com>
# SPDX-FileCopyrightText: 2021 Silver <silvertorch5@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 SweptWasTaken <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 TimrodDX <timrod@gmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 Ygg01 <y.laughing.man.y@gmail.com>
# SPDX-FileCopyrightText: 2021 ZeroDayDaemon <60460608+ZeroDayDaemon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 ike709 <ike709@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <notzombiedude@gmail.com>
# SPDX-FileCopyrightText: 2021 scrato <Mickaello2003@gmx.de>
# SPDX-FileCopyrightText: 2022 Jezithyr <Jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Veritius <veritiusgaming@gmail.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 rolfero <45628623+rolfero@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Henry <sigma1198@gmail.com>
# SPDX-FileCopyrightText: 2023 LankLTE <135308300+LankLTE@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 FungiFellow <151778459+FungiFellow@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Jezithyr <jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 mubururu_ <139181059+muburu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Arraydeess <arraygitbash@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Martynas6ha4 <martynashagriefer@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: BaseHumanOrganUnGibbable
  parent: BaseItem
  abstract: true
  components:
  # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      collection: OrganInteraction
  - type: EmitSoundOnDrop
    sound:
      collection: OrganInteraction
  - type: EmitSoundOnLand
    sound:
      collection: OrganInteraction
  # Goobstation edit end
  - type: Sprite
    sprite: Mobs/Species/Human/organs.rsi
  - type: Organ
    intCap: 15
    integrity: 15
    integrityThresholds:
      Normal: 15
      Damaged: 6
      Destroyed: 0
  - type: Food
  - type: Extractable
    grindableSolutionName: organ
  - type: SolutionContainerManager
    solutions:
      organ:
        reagents:
        - ReagentId: Nutriment
          Quantity: 10
      food:
        maxVol: 5
        reagents:
        - ReagentId: UncookedAnimalProteins
          Quantity: 5
  - type: FlavorProfile
    flavors:
      - people
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
  - type: HumanOrgan # Goobstation

- type: entity
  id: BaseHumanOrgan
  parent: BaseHumanOrganUnGibbable
  abstract: true
  components:
  - type: Gibbable
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Biomass: 5

- type: entity
  id: OrganHumanBrain
  parent: BaseHumanOrganUnGibbable
  name: brain
  description: "The source of incredible, unending intelligence. Honk."
  components:
  - type: MindContainer
    showExamineInfo: true
  - type: Speech
    enabled: false
  - type: TypingIndicator
    proto: empty
  - type: Emoting
    enabled: false
  - type: Sprite
    state: brain
  - type: Organ
    slotId: brain # Shitmed Change
  - type: Input
    context: "ghost"
  - type: Brain
  - type: InputMover
  - type: Examiner
  - type: BlockMovement
  - type: BadFood
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Brain
  - type: SolutionContainerManager
    solutions:
      organ:
        reagents:
        - ReagentId: Nutriment
          Quantity: 10
        - ReagentId: Cognizine # goob edit
          Quantity: 5 # goob edit
      food:
        maxVol: 10 # goob edit
        reagents:
        - ReagentId: GreyMatter
          Quantity: 5
        - ReagentId: Cognizine # goob edit
          Quantity: 5 # goob edit
  - type: FlavorProfile
    flavors:
      - people
  - type: FoodSequenceElement
    sprite:
      sprite: Mobs/Species/Human/organs.rsi
      state: brain
    entries:
      burger:
        name: food-sequence-content-brain
      taco:
        name: food-sequence-content-brain
  - type: Item
    size: Small
    heldPrefix: brain
  - type: NerveSystem
  - type: ConsciousnessRequired
    identifier: "nerveSystem"

- type: entity
  id: OrganHumanEyes
  parent: BaseHumanOrgan
  name: eyes
  description: "I see you!"
  components:
  - type: Organ # Shitmed Change
    intCap: 12
    integrity: 12
    integrityThresholds:
      Normal: 12
      Damaged: 4
      Destroyed: 0
    slotId: eyes # Shitmed Change
  - type: Eyes # Shitmed Change
  - type: Sprite
    layers:
      - state: eyeball-l
      - state: eyeball-r
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Eyes
  - type: Item
    size: Small
    heldPrefix: eyeballs

- type: entity
  id: OrganHumanTongue
  parent: BaseHumanOrgan
  name: tongue
  description: "A fleshy muscle mostly used for lying."
  components:
  - type: Sprite
    state: tongue
  - type: FoodSequenceElement
    sprite:
      sprite: Mobs/Species/Human/organs.rsi
      state: tongue
    entries:
      burger:
        name: food-sequence-content-tongue
      taco:
        name: food-sequence-content-tongue
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Tongue

- type: entity
  id: OrganHumanAppendix
  parent: BaseHumanOrgan
  name: appendix
  components:
  - type: Sprite
    layers:
    - state: appendix
    - state: appendix-inflamed
      visible: false

- type: entity
  id: OrganHumanEars
  parent: BaseHumanOrgan
  name: ears
  description: "There are three parts to the ear. Inner, middle and outer. Only one of these parts should normally be visible."
  components:
  - type: Sprite
    state: ears
  - type: FoodSequenceElement
    sprite:
      sprite: Mobs/Species/Human/organs.rsi
      state: ears
    entries:
      burger:
        name: food-sequence-content-ears
      taco:
        name: food-sequence-content-ears
  - type: Ears # Shitmed Change

- type: entity
  id: OrganHumanLungs
  parent: BaseHumanOrgan
  name: lungs
  description: "Filters oxygen from an atmosphere, which is then sent into the bloodstream to be used as an electron carrier."
  components:
  - type: Organ # Shitmed Change
    intCap: 17
    integrity: 17
    integrityThresholds:
      Normal: 17
      Damaged: 9
      Destroyed: 0
    slotId: lungs # Shitmed Change
  - type: Sprite
    layers:
      - state: lung-l
      - state: lung-r
  - type: Item
    size: Small
    heldPrefix: lungs
  - type: Lung
  - type: Metabolizer
    removeEmpty: true
    solutionOnBody: false
    solution: "Lung"
    metabolizerTypes: [ Human ]
    groups:
    - id: Gas
      rateModifier: 100.0
  - type: SolutionContainerManager
    solutions:
      organ:
        reagents:
        - ReagentId: Nutriment
          Quantity: 10
      Lung:
        maxVol: 100.0
        canReact: false
      food:
        maxVol: 5
        reagents:
        - ReagentId: UncookedAnimalProteins
          Quantity: 5
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Lungs

- type: entity
  id: OrganHumanHeart
  parent: BaseHumanOrgan
  name: heart
  description: "I feel bad for the heartless bastard who lost this."
  components:
  - type: Heart # Shitmed Change
  - type: Organ # Shitmed Change
    intCap: 17
    integrity: 17
    integrityThresholds:
      Normal: 17
      Damaged: 9
      Destroyed: 0
    slotId: heart # Shitmed Change
  - type: Sprite
    state: heart-on
  # The heart 'metabolizes' medicines and poisons that aren't filtered out by other organs.
  # This is done because these chemicals need to have some effect even if they aren't being filtered out of your body.
  # You're technically 'immune to poison' without a heart, but.. uhh, you'll have bigger problems on your hands.
  - type: Metabolizer
    maxPoisonsProcessable: 2
    metabolizerTypes: [Human]
    groups:
    - id: Medicine
    - id: Poison
    - id: Narcotic
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Heart
  - type: Item
    size: Small
    heldPrefix: heart

- type: entity
  id: OrganHumanStomach
  parent: BaseHumanOrgan
  name: stomach
  description: "Gross. This is hard to stomach."
  components:
  - type: Organ # Shitmed Change
    intCap: 44 # consists of a lot of pieces, thus is incredibly hard to easily destroy
    integrity: 44
    integrityThresholds:
      Normal: 44
      Damaged: 17
      Destroyed: 0
    slotId: stomach # Shitmed Change
  - type: Sprite
    state: stomach
  - type: Item
    size: Small
    heldPrefix: stomach
  - type: SolutionContainerManager
    solutions:
      stomach:
        maxVol: 50
      food:
        maxVol: 5
        reagents:
        - ReagentId: UncookedAnimalProteins
          Quantity: 5
  - type: Stomach
  # The stomach metabolizes stuff like foods and drinks.
  # TODO: Have it work off of the ent's solution container, and move this
  # to intestines instead.
  - type: Metabolizer
    # mm yummy
    maxPoisonsProcessable: 3
    metabolizerTypes: [Human]
    groups:
    - id: Food
    - id: Drink
  - type: FoodSequenceElement
    sprite:
      sprite: Mobs/Species/Human/organs.rsi
      state: stomach
    entries:
      burger:
        name: food-sequence-content-stomach
      taco:
        name: food-sequence-content-stomach
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Stomach

- type: entity
  id: OrganHumanLiver
  parent: BaseHumanOrgan
  name: liver
  description: "Pairing suggestion: chianti and fava beans."
  components:
  - type: Liver # Shitmed Change
  - type: Organ # Shitmed Change
    intCap: 21
    integrity: 21
    integrityThresholds:
      Normal: 21
      Damaged: 12
      Destroyed: 0
    slotId: liver # Shitmed Change
  - type: Sprite
    state: liver
  - type: Item
    size: Small
    heldPrefix: liver
  - type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol.
    maxPoisonsProcessable: 1
    metabolizerTypes: [Human]
    groups:
    - id: Alcohol
      rateModifier: 0.1 # removes alcohol very slowly along with the stomach removing it as a drink
  - type: FoodSequenceElement
    sprite:
      sprite: Mobs/Species/Human/organs.rsi
      state: liver
    entries:
      burger:
        name: food-sequence-content-liver
      taco:
        name: food-sequence-content-liver
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Liver

- type: entity
  id: OrganHumanKidneys
  parent: BaseHumanOrgan
  name: kidneys
  description: "Filters toxins from the bloodstream."
  components:
  - type: Organ # Shitmed
    intCap: 21
    integrity: 21
    integrityThresholds:
      Normal: 21
      Damaged: 12
      Destroyed: 0
    slotId: kidneys
  - type: Sprite
    layers:
      - state: kidney-l
      - state: kidney-r
  - type: Item
    size: Small
    heldPrefix: kidneys
  # The kidneys just remove anything that doesn't currently have any metabolisms, as a stopgap.
  - type: Metabolizer
    maxPoisonsProcessable: 5
    metabolizerTypes: [Human]
    removeEmpty: true
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Kidneys
