- type: entity
  parent: BaseItem
  id: BaseBeaker
  abstract: true
  components:
  - type: Tag
    tags:
    - GlassBeaker
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker.rsi
    layers:
      - state: beaker
      - state: beaker1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: Item
    sprite: Objects/Specific/Chemistry/beaker.rsi
  - type: MeleeWeapon
    soundNoDamage:
      path: "/Audio/Effects/Fluids/splat.ogg"
    damage:
      types:
        Blunt: 0
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
  - type: MixableSolution
    solution: beaker
  - type: FitsInDispenser
    solution: beaker
  - type: RefillableSolution
    solution: beaker
  - type: DrainableSolution
    solution: beaker
  - type: ExaminableSolution
    solution: beaker
    exactVolume: true
  - type: DrawableSolution
    solution: beaker
  - type: InjectableSolution
    solution: beaker
  - type: SolutionTransfer
    canChangeTransferAmount: true
  - type: SolutionItemStatus
    solution: beaker
  - type: UserInterface
    interfaces:
      enum.TransferAmountUiKey.Key:
        type: TransferAmountBoundUserInterface
  - type: Edible
    edible: Drink
    solution: beaker
    destroyOnEmpty: false
    utensil: None
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 6
    fillBaseName: beaker
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Glass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 5
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -4
      - !type:SpillBehavior
        solution: beaker
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlass:
            min: 1
            max: 1
        transferForensics: true
      - !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: StaticPrice
    price: 30
  - type: DnaSubstanceTrace

- type: entity
  parent: BaseItem
  id: BaseBeakerMetallic
  abstract: true
  components:
  - type: Tag
    tags:
    - GlassBeaker
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker.rsi
    layers:
      - state: beaker
      - state: beaker1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: Item
    sprite: Objects/Specific/Chemistry/beaker.rsi
  - type: MeleeWeapon
    soundNoDamage:
      path: "/Audio/Effects/Fluids/splat.ogg"
    damage:
      types:
        Blunt: 0
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
  - type: MixableSolution
    solution: beaker
  - type: FitsInDispenser
    solution: beaker
  - type: RefillableSolution
    solution: beaker
  - type: DrainableSolution
    solution: beaker
  - type: ExaminableSolution
    solution: beaker
    exactVolume: true
  - type: DrawableSolution
    solution: beaker
  - type: InjectableSolution
    solution: beaker
  - type: SolutionTransfer
    canChangeTransferAmount: true
  - type: SolutionItemStatus
    solution: beaker
  - type: UserInterface
    interfaces:
      enum.TransferAmountUiKey.Key:
        type: TransferAmountBoundUserInterface
  - type: Edible
    edible: Drink
    solution: beaker
    destroyOnEmpty: false
    utensil: Spoon
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 6
    fillBaseName: beaker
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Glass
  - type: StaticPrice
    price: 30
  - type: DnaSubstanceTrace

- 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: StaticPrice
    price: 10
  - type: PhysicalComposition
    materialComposition:
      Glass: 50
  - type: SolutionContainerVisuals
    maxFillLevels: 6
    fillBaseName: beaker
    inHandsMaxFillLevels: 3
    inHandsFillBaseName: -fill-

- type: entity
  suffix: cryoxadone
  parent: Beaker
  id: CryoxadoneBeakerSmall
  components:
  - type: Label
    currentLabel: reagent-name-cryoxadone
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Cryoxadone
          Quantity: 50

- type: entity
  parent: Beaker
  id: BeakerSmallArith
  suffix: arithrazine
  components:
  - type: Label
    currentLabel: reagent-name-arithrazine
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Arithrazine
          Quantity: 50

- type: entity
  parent: Beaker
  id: BeakerSmallSigy
  suffix: sigynate
  components:
  - type: Label
    currentLabel: reagent-name-sigynate
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Sigynate
          Quantity: 50

- type: entity
  parent: Beaker
  id: BeakerSmallPhal
  suffix: phalanximine
  components:
  - type: Label
    currentLabel: reagent-name-phalanximine
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Phalanximine
          Quantity: 50

- type: entity
  parent: Beaker
  id: BeakerSmallDiph
  suffix: diphenhydramine
  components:
  - type: Label
    currentLabel: reagent-name-diphenhydramine
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Diphenhydramine
          Quantity: 50

- type: entity
  parent: Beaker
  id: BeakerSmallBruiz
  suffix: bruizine
  components:
  - type: Label
    currentLabel: reagent-name-bruizine
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Bruizine
          Quantity: 50

- type: entity
  parent: Beaker
  id: BeakerSmallLace
  suffix: lacerinol
  components:
  - type: Label
    currentLabel: reagent-name-lacerinol
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 50
        reagents:
        - ReagentId: Lacerinol
          Quantity: 50

- 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
    size: Normal
    sprite: Objects/Specific/Chemistry/beaker_large.rsi
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 100
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 6
    fillBaseName: beakerlarge
    inHandsMaxFillLevels: 4
    inHandsFillBaseName: -fill-
  - type: PhysicalComposition
    materialComposition:
      Glass: 100
  - type: StaticPrice
    price: 20

- type: entity
  name: cryostasis beaker
  parent: BaseBeakerMetallic
  description: Used to contain chemicals or solutions without reactions.
  id: CryostasisBeaker
  components:
  - type: Spillable
    solution: beaker
  - type: Sprite
    sprite: Objects/Specific/Chemistry/beaker_cryostasis.rsi
    layers:
      - state: beakernoreact
  - type: SolutionContainerVisuals
    maxFillLevels: 0
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 60
        canReact: false

- type: entity
  name: bluespace beaker
  parent: BaseBeakerMetallic
  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: SolutionContainerVisuals
    maxFillLevels: 0
  - type: SolutionContainerManager
    solutions:
      beaker:
        maxVol: 1000

- 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
    layers:
      - state: dropper
      - state: dropper1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 5
  - type: Injector
    ignoreMobs: true
    ignoreClosed: false
    activeModeProtoId: DropperDrawMode
    allowedModes:
    - DropperDrawMode
    - DropperInjectMode
  - type: ExaminableSolution
    solution: dropper
    exactVolume: true
  - type: UserInterface
    interfaces:
      enum.TransferAmountUiKey.Key:
        type: TransferAmountBoundUserInterface
  - type: Spillable
    solution: injector
  - type: Item
    sprite: Objects/Specific/Chemistry/dropper.rsi
    size: Tiny
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    fillBaseName: dropper
    inHandsMaxFillLevels: 1
    inHandsFillBaseName: -fill-
  - type: StaticPrice
    price: 40
  - type: DnaSubstanceTrace
  - type: Tag
    tags:
    - Dropper
  - type: PhysicalComposition

- type: entity
  parent: Dropper
  id: BorgDropper
  name: hydraulic pipette
  description: State-of-the-art hydraulic dropper built for cyborgs. It features a higher capacity than hand-powered droppers, able to hold 15 units of liquid.
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/dropper.rsi
    layers:
      - state: borgdropper
      - state: dropper1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 15
  - type: Item
    sprite: Objects/Specific/Chemistry/dropper.rsi

- type: entity
  name: syringe
  parent: BaseItem
  description: Used to draw blood samples from mobs, or to inject them with reagents.
  id: BaseSyringe
  abstract: true
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/syringe.rsi
    layers:
      - state: syringe1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
      - state: syringe_base0
        map: ["enum.SolutionContainerLayers.Base"]
  - type: Icon
    sprite: Objects/Specific/Chemistry/syringe.rsi
    state: "syringe_base0"
  - type: Item
    size: Tiny
    sprite: Objects/Specific/Chemistry/syringe.rsi
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 15
  - type: Injector
    activeModeProtoId: SyringeDrawMode
    allowedModes:
    - SyringeDrawMode
    - SyringeInjectMode
  - type: ExaminableSolution
    solution: injector
    exactVolume: true
  - type: Spillable
    solution: injector
  - type: TrashOnSolutionEmpty
    solution: injector
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: syringe
    inHandsMaxFillLevels: 3
    inHandsFillBaseName: -fill-
  - type: Tag
    tags:
    - Syringe

- type: entity
  parent: BaseSyringe
  id: Syringe
  components:
  - type: Tag
    tags:
    - Syringe
    - Trash

- type: entity
  name: mini syringe
  parent: Syringe
  description: A regular syringe, reshaped to fit inside of a gun.
  id: MiniSyringe
  components:
  - type: Sprite
    sprite: Objects/Specific/Chemistry/syringe.rsi
    layers:
      - state: minisyringe1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
      - state: syringeproj
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 5
  - type: SolutionContainerVisuals
    maxFillLevels: 3
    fillBaseName: minisyringe
    inHandsMaxFillLevels: 3
    inHandsFillBaseName: -fill-
  - type: EmbeddableProjectile
    offset: "0,-0.1"
    minimumSpeed: 3
    removalTime: 0.25
    embedOnThrow: false
  - type: SolutionInjectWhileEmbedded
    transferAmount: 1
    solution: injector
    updateInterval: 2
  - type: SolutionInjectOnEmbed
    transferAmount: 1
    solution: injector
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PhysShapeCircle
          radius: 0.2
        density: 5
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.2
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.3,0.1,0.3"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: true
    damage:
      types:
        Piercing: 5
  - type: Tag
    tags:
    - Syringe
    - Trash
    - SyringeGunAmmo

- type: entity
  abstract: true
  parent: BaseSyringe
  id: PrefilledSyringe
  components:
  - type: Injector
    activeModeProtoId: SyringeInjectMode

- type: entity
  id: SyringeBluespace
  parent: BaseSyringe
  name: bluespace syringe
  description: Injecting with advanced bluespace technology.
  components:
  - type: Sprite
    layers:
    - state: syringe1
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: false
    - state: bluespace_base0
      map: ["enum.SolutionContainerLayers.Base"]
  - type: Icon
    sprite: Objects/Specific/Chemistry/syringe.rsi
    state: bluespace_base0
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 100
  - type: Injector
    activeModeProtoId: BluespaceSyringeDrawMode
    allowedModes:
    - BluespaceSyringeInjectMode
    - BluespaceSyringeDrawMode
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: syringe
  - type: Tag
    tags:
    - Syringe
    - Trash

- type: entity
  id: SyringeCryostasis
  parent: BaseSyringe
  name: cryostasis syringe
  description: A syringe used to contain chemicals or solutions without reactions.
  components:
  - type: Sprite
    layers:
    - state: syringe1
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: false
    - state: cryo_base0
      map: ["enum.SolutionContainerLayers.Base"]
  - type: Icon
    sprite: Objects/Specific/Chemistry/syringe.rsi
    state: cryo_base0
  - type: SolutionContainerManager
    solutions:
      injector:
        maxVol: 10
        canReact: false
  - type: Injector
    activeModeProtoId: CryostasisSyringeDrawMode
    allowedModes:
    - CryostasisSyringeInjectMode
    - CryostasisSyringeDrawMode
  - type: Tag
    tags:
    - Syringe
    - Trash

- 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: Tiny
    sprite: Objects/Specific/Chemistry/pills.rsi
  - type: Pill
  - type: Edible
    delay: 0.6
    forceFeedDelay: 2
    transferAmount: null
    edible: Pill
  - type: BadFood
  - type: FlavorProfile
    ignoreReagents: []
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 20
  - type: ExplosionResistance
    damageCoefficient: 0.025 # survives conventional explosives but not minibombs and nukes
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:SpillBehavior
        solution: food
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: SolutionSpiker
    sourceSolution: food
  - type: Extractable
    grindableSolutionName: food
  - type: StaticPrice
    price: 0
  - type: Tag
    tags:
    - Pill

- type: entity
  name: pill canister
  id: PillCanister
  parent: BaseStorageItem
  description: Holds up to 10 pills.
  components:
  - type: Item
    size: Tiny
    sprite: Objects/Specific/Chemistry/pills_canister.rsi
  - type: Sprite
    sprite: Objects/Specific/Chemistry/pills_canister.rsi
    state: pill_canister
  - type: Tag
    tags:
      - PillCanister
  - type: Storage
    grid:
    - 0,0,4,1
    quickInsert: true
    areaInsert: true
    areaInsertRadius: 1
    storageInsertSound: /Audio/Effects/pill_insert.ogg
    storageRemoveSound: /Audio/Effects/pill_remove.ogg
    whitelist:
      tags:
      - Pill
  - type: Dumpable
