- type: entity
  parent: BaseItem
  id: BaseBeaker
  components:
  - type: Tag
    tags:
    - GlassBeaker
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker.rsi
    netsync: false
    layers:
      - state: beaker
      - state: beaker1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: Item
    sprite: Objects/Specific/Chemistry/beaker.rsi
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
  - type: FitsInDispenser
    solution: beaker
  - type: RefillableSolution
    solution: beaker
  - type: DrainableSolution
    solution: beaker
  - type: ExaminableSolution
    solution: beaker
  - type: DrawableSolution
    solution: beaker
  - type: InjectableSolution
    solution: beaker
  - type: SolutionTransfer
    canChangeTransferAmount: true
  - type: UserInterface
    interfaces:
    - key: enum.TransferAmountUiKey.Key
      type: TransferAmountBoundUserInterface
  - type: Drink
    isOpen: true
  - type: Appearance
    visuals:
    - type: SolutionContainerVisualizer
      maxFillLevels: 6
      fillBaseName: beaker
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Glass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 5
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:SpillBehavior
        solution: beaker
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlass:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: DamageOnLand
    damage:
      types:
        Blunt: 10 # glass resistance set reduces damage. Need to land twice (w/o hitting wall)
  - type: DamageOtherOnHit
    damage:
      types:
        Blunt: 5
  - type: DamageOnHighSpeedImpact
    minimumSpeed: 2
    damage:
      types:
        Blunt: 5

- type: entity
  name: beaker
  parent: BaseBeaker
  description: Used to contain a moderate amount of chemicals and solutions.
  id: Beaker
  components:
  - type: Spillable
    solution: beaker

- type: entity
  name: large beaker
  parent: BaseBeaker
  description: Used to contain a large amount of chemicals or solutions.
  id: LargeBeaker
  components:
  - type: Spillable
    solution: beaker
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker_large.rsi
    layers:
      - state: beakerlarge
      - state: beakerlarge1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: Item
    sprite: Objects/Specific/Chemistry/beaker_large.rsi
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 100
  - type: Appearance
    visuals:
    - type: SolutionContainerVisualizer
      maxFillLevels: 6
      fillBaseName: beakerlarge

- type: entity
  name: cryostasis beaker
  parent: BaseBeaker
  description: Used to contain chemicals or solutions without reactions.
  id: CryostasisBeaker
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker_cryostasis.rsi
    layers:
      - state: beakernoreact
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 40
        canReact: false
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: FlimsyMetallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:SpillBehavior
        solution: beaker
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
        
- type: entity
  name: bluespace beaker
  parent: BaseBeaker
  description: Powered by experimental bluespace technology.
  id: BluespaceBeaker
  components:
  - type: Spillable
    solution: beaker
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker_bluespace.rsi
    layers:
      - state: beakerbluespace
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 300

- type: entity
  name: dropper
  parent: BaseItem
  description: Used to transfer small amounts of chemical solution between containers.
  id: Dropper
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/dropper.rsi
    netsync: false
    layers:
      - state: dropper
      - state: dropper1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: SolutionContainerManager
    solutions:
      dropper:
        maxVol: 5
  - type: RefillableSolution
    solution: dropper
  - type: DrainableSolution
    solution: dropper
  - type: ExaminableSolution
    solution: dropper
  - type: SolutionTransfer
    minTransferAmount: 1
    transferAmount: 1
    maxTransferAmount: 5
    canChangeTransferAmount: true
  - type: UserInterface
    interfaces:
    - key: enum.TransferAmountUiKey.Key
      type: TransferAmountBoundUserInterface
  - type: Spillable
    solution: dropper
  - type: Item
    sprite: Objects/Specific/Chemistry/dropper.rsi
  - type: Appearance
    visuals:
    - type: SolutionContainerVisualizer
      maxFillLevels: 1
      fillBaseName: dropper

- type: entity
  name: syringe
  parent: BaseItem
  description: Used to draw blood samples from mobs, or to inject them with reagents.
  id: Syringe
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/syringe.rsi
    netsync: false
    layers:
      - state: syringe1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
      - state: syringe_base0
        map: ["enum.SolutionContainerLayers.Base"]
  - type: Item
    sprite: Objects/Specific/Chemistry/syringe.rsi
    HeldPrefix: 0
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 15
  - type: Injector
    injectOnly: false
  - type: Spillable
    solution: injector
  - type: Appearance
    visuals:
      # this visualizer used for reagent inside
    - type: SolutionContainerVisualizer
      maxFillLevels: 4
      fillBaseName: syringe
      # this one for syrigine itself (plunger)
    - type: SolutionContainerVisualizer
      maxFillLevels: 4
      fillBaseName: syringe_base
      emptySpriteName: syringe_base0
      layer: Base
      changeColor: false

- type: entity
  name: pill
  parent: BaseItem
  id: Pill
  description: It's not a suppository.
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/pills.rsi
    state: pill
  - type: Item
    size: 1
    sprite: Objects/Specific/Chemistry/pills.rsi
  - type: Tag
    tags:
      - Pill
  - type: Food
    forceFeedDelay: 1
    transferAmount: null
    eatMessage: food-swallow
    useSound: /Audio/Items/pill.ogg
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 50

- type: entity
  name: pill canister
  id: PillCanister
  parent: BaseItem
  description: Holds up to 12 pills.
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/pills_canister.rsi
    state: pill_canister
  - type: Item
    sprite: Objects/Specific/Chemistry/pills_canister.rsi
  - type: Tag
    tags:
      - PillCanister
  - type: Storage
    capacity: 12
    quickInsert: true
    areaInsert: true
    areaInsertRadius: 1
    whitelist:
      tags:
        - Pill
