- type: entity
  id: BaseHumanOrgan
  parent: BaseItem
  abstract: true
  components:
  - type: Sprite
    netsync: false
    sprite: Mobs/Species/Human/organs.rsi
  - type: Mechanism
  - type: Food
  - type: Extractable
    grindableSolutionName: organ
  - type: SolutionContainerManager
    solutions:
      organ:
        reagents:
        - ReagentId: Nutriment
          Quantity: 10

- type: entity
  id: OrganHumanBrain
  parent: BaseHumanOrgan
  name: brain
  description: "The source of incredible, unending intelligence. Honk."
  components:
  - type: Sprite
    state: brain
  - type: Mechanism
    size: 1
    compatibility: Biological
  - type: Input
    context: "ghost"
  - type: DummyInputMover
  - type: GhostOnMove
  - type: Brain

- type: entity
  id: OrganHumanEyes
  parent: BaseHumanOrgan
  name: eyes
  description: "I see you!"
  components:
  - type: Sprite
    layers:
      - state: eyeball-l
      - state: eyeball-r
  - type: Mechanism
    size: 1
    compatibility: Biological

- type: entity
  id: OrganHumanTongue
  parent: BaseHumanOrgan
  name: tongue
  description: "A fleshy muscle mostly used for lying."
  components:
  - type: Sprite
    state: tongue
  - type: Mechanism
    size: 1
    compatibility: Biological

- type: entity
  id: OrganHumanAppendix
  parent: BaseHumanOrgan
  name: appendix
  components:
  - type: Sprite
    layers:
    - state: appendix
    - state: appendix-inflamed
      visible: false
  - type: Mechanism
    size: 1
    compatibility: Biological

- 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: Mechanism
    size: 1
    compatibility: Biological

- 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: Sprite
    layers:
      - state: lung-l
      - state: lung-r
  - type: Mechanism
    size: 1
    compatibility: Biological
  - type: Lung
  - type: Metabolizer
    removeEmpty: true
    solutionOnBody: false
    solution: "Lung"
    metabolizerTypes: [ Human ]
    groups:
    - id: Gas
      rateModifier: 100.0

- type: entity
  id: OrganHumanHeart
  parent: BaseHumanOrgan
  name: heart
  description: "I feel bad for the heartless bastard who lost this."
  components:
  - type: Sprite
    state: heart-on
  - type: Mechanism
    size: 1
    compatibility: Biological
  # 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
    maxReagents: 2
    metabolizerTypes: [Human]
    groups:
    - id: Medicine
    - id: Poison
    - id: Narcotic

- type: entity
  id: OrganHumanStomach
  parent: BaseHumanOrgan
  name: stomach
  description: "Gross. This is hard to stomach."
  components:
  - type: Sprite
    state: stomach
  - type: Mechanism
    size: 1
    compatibility: Biological
  - type: SolutionContainerManager
    solutions:
      stomach:
        maxVol: 250
  - type: Stomach
    maxVolume: 250
    digestionDelay: 20
  # 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
    maxReagents: 3
    metabolizerTypes: [Human]
    groups:
    - id: Food
    - id: Drink

- type: entity
  id: OrganHumanLiver
  parent: BaseHumanOrgan
  name: liver
  description: "Pairing suggestion: chianti and fava beans."
  components:
  - type: Sprite
    state: liver
  - type: Mechanism
    size: 1
    compatibility: Biological
  - type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol.
    maxReagents: 1
    metabolizerTypes: [Human]
    groups:
    - id: Alcohol
      rateModifier: 0.1 # removes alcohol very slowly along with the stomach removing it as a drink

- type: entity
  id: OrganHumanKidneys
  parent: BaseHumanOrgan
  name: kidneys
  description: "Filters toxins out of a bloodstream."
  components:
  - type: Sprite
    layers:
      - state: kidney-l
      - state: kidney-r
  - type: Mechanism
    size: 1
    compatibility: Biological
  # The kidneys just remove anything that doesn't currently have any metabolisms, as a stopgap.
  - type: Metabolizer
    maxReagents: 5
    metabolizerTypes: [Human]
    removeEmpty: true
