# SPDX-FileCopyrightText: 2023 Henry <sigma1198@gmail.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 LankLTE <135308300+LankLTE@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 PixelTK <85175107+PixelTheKermit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 degradka <69397649+degradka@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 mubururu_ <139181059+muburu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 0x6273 <0x40@keemail.me>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: BaseArachnidOrgan
  parent: BaseItem
  abstract: true
  components:
  - type: Sprite
    sprite: Mobs/Species/Arachnid/organs.rsi
  - type: Organ
    intCap: 28
    integrity: 28
    integrityThresholds:
      Normal: 28
      Damaged: 16
      Destroyed: 0
  - type: Food
  - type: Extractable
    grindableSolutionName: organ
  - type: SolutionContainerManager
    solutions:
      organ:
        maxVol: 10
        reagents:
        - ReagentId: Nutriment
          Quantity: 10
      food:
        maxVol: 5
        reagents:
        - ReagentId: UncookedAnimalProteins
          Quantity: 5
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Biomass: 5

- type: entity
  id: OrganArachnidStomach
  parent: OrganAnimalStomach
  name: stomach
  description: "Gross. This is hard to stomach."
  components:
  - type: Sprite
    sprite: Mobs/Species/Arachnid/organs.rsi
    state: stomach
  - type: Organ # Shitmed
    intCap: 44
    integrity: 44
    integrityThresholds:
      Normal: 44
      Damaged: 21
      Destroyed: 0
    slotId: stomach
  - type: Item
    size: Small
    heldPrefix: stomach
  - type: Stomach
    digestionDelay: 30
  - type: SolutionContainerManager
    solutions:
      stomach:
        maxVol: 50
      food:
        maxVol: 5
        reagents:
        - ReagentId: UncookedAnimalProteins
          Quantity: 5
  - type: Metabolizer
    updateInterval: 1.5
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Stomach

- type: entity
  id: OrganArachnidLungs
  parent: BaseArachnidOrgan
  name: lungs
  description: "Filters oxygen from an atmosphere... just more greedily."
  components:
  - type: Sprite
    layers:
      - state: lung-l
      - state: lung-r
  - type: Organ # Shitmed
    intCap: 28
    integrity: 28
    integrityThresholds:
      Normal: 28
      Damaged: 16
      Destroyed: 0
    slotId: lungs
  - type: Lung
  - type: Metabolizer
    updateInterval: 1.5
    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: OrganArachnidHeart
  parent: BaseArachnidOrgan
  name: heart
  description: "A disgustingly persistent little biological pump made for spiders."
  components:
  - type: Sprite
    state: heart-on
  - type: Item
    size: Small
    heldPrefix: heart
  - type: Metabolizer
    updateInterval: 1.5
    maxPoisonsProcessable: 2
    metabolizerTypes: [Arachnid]
    groups:
    - id: Medicine
    - id: Poison
    - id: Narcotic
  - type: Organ # Shitmed
    intCap: 21
    integrity: 21
    integrityThresholds:
      Normal: 21
      Damaged: 12
      Destroyed: 0
    slotId: heart
  - type: Heart # Shitmed: Lets you transplant spider hearts into other species
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Heart

- type: entity
  id: OrganArachnidLiver
  parent: BaseHumanOrgan
  name: liver
  description: "Pairing suggestion: chianti and fava beans."
  categories: [ HideSpawnMenu ]
  components:
  - type: Item
    size: Small
    heldPrefix: liver
  - type: Sprite
    state: liver
  - type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol.
    updateInterval: 1.5
    maxPoisonsProcessable: 1
    metabolizerTypes: [Animal]
    groups:
    - id: Alcohol
      rateModifier: 0.1 # removes alcohol very slowly along with the stomach removing it as a drink
  - type: Organ # Shitmed
    intCap: 28
    integrity: 28
    integrityThresholds:
      Normal: 28
      Damaged: 16
      Destroyed: 0
    slotId: liver
  - type: Liver # Shitmed
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Liver

- type: entity
  id: OrganArachnidKidneys
  parent: BaseHumanOrgan
  name: kidneys
  description: "Filters toxins from the bloodstream."
  categories: [ HideSpawnMenu ]
  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
  # The kidneys just remove anything that doesn't currently have any metabolisms, as a stopgap.
  - type: Item
    size: Small
    heldPrefix: kidneys
  - type: Metabolizer
    updateInterval: 1.5
    maxPoisonsProcessable: 5
    metabolizerTypes: [Animal]
    removeEmpty: true
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Kidneys

- type: entity
  id: OrganArachnidEyes
  parent: BaseArachnidOrgan
  name: eyes
  description: "Two was already too many."
  components:
  - type: Sprite
    layers:
      - state: eyeball-l
      - state: eyeball-r
  - type: Organ # Shitmed
    intCap: 17
    integrity: 17
    integrityThresholds:
      Normal: 17
      Damaged: 8
      Destroyed: 0
    slotId: eyes
  - type: Eyes # Shitmed
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Eyes
  - type: Item
    size: Small
    heldPrefix: eyeballs

- type: entity
  id: OrganArachnidTongue
  parent: BaseArachnidOrgan
  name: tongue
  description: "A fleshy muscle mostly used for lying."
  components:
  - type: Sprite
    state: tongue
  - type: Tag # goob edit
    tags:
    - Meat
    - Organ
    - Tongue