# SPDX-FileCopyrightText: 2024 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 a_person <40855173+a-person5660@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 BramvanZijp <56019239+BramvanZijp@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 CometVoid <cometsstrile@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX-7 <92227810+SX-7@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Solstice <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Cartridge Autoinjectors

- type: entity
  parent: BaseItem
  id: BaseCartridgeAutoinjector
  abstract: true
  components:
  - type: Item
    sprite: _Goobstation/Objects/Specific/Medical/autoinjector.rsi
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/autoinjector.rsi
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    fillBaseName: cartridge
  - type: Appearance
  - type: SolutionContainerManager
    solutions:
      hypospray:
        maxVol: 10
  - type: ExaminableSolution
    solution: hypospray
  - type: Hypospray
    solutionName: hypospray
    transferAmount: 10
    onlyAffectsMobs: false
    injectOnly: true
  - type: HyposprayBlockNonMobInjection
  - type: UseDelay
    delay: 30
  - type: ContainerContainer
    containers:
      item: !type:ContainerSlot
  - type: ItemSlots
    slots:
      item:
        name: Cartridge
        whitelist:
          tags:
          - AutoinjectorCartridge

- type: entity
  name: security cartridge autoinjector
  parent: [ BaseCartridgeAutoinjector , BaseSecurityContraband ]
  description: Used for rapid administration of medicine. Uses cartridges printable at the security techfab.
  id: SecHypo
  components:
  - type: Sprite
    layers:
      - state: security-base
      - state: cartridge1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false
  - type: UseDelay
    delay: 45 # up this later if its too low
  - type: Tag
    tags:
      - SecBeltEquip

- type: entity
  name: medical cartridge autoinjector
  parent: [ BaseCartridgeAutoinjector , BaseMedicalContraband ]
  description: Used for rapid administration of medicine. Uses cartridges printable at the medical techfab.
  id: ParamedHypo
  components:
  - type: Sprite
    layers:
      - state: medical-base
      - state: cartridge1
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: false

- type: entity # This ones weird.
  name: amnestic spray
  parent: [BaseItem, BaseCentcommContraband]
  id: AmnestizineHypospray
  suffix: DO NOT MAP
  description: A specialized cartridge injector intended for Central Command personnel. Primarily used to inject amnestics.
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/amnestic_hypo.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Objects/Specific/Medical/amnestic_hypo.rsi
  - type: UseDelay
    delay: 3
  - type: Appearance
  - type: SolutionContainerManager
    solutions:
      hypospray:
        maxVol: 10
  - type: ExaminableSolution
    solution: hypospray
  - type: Hypospray
    solutionName: hypospray
    transferAmount: 10
    onlyAffectsMobs: false
    injectOnly: true
  - type: HyposprayBlockNonMobInjection
  - type: ContainerContainer
    containers:
      item: !type:ContainerSlot
  - type: ItemSlots
    slots:
      item:
        name: Cartridge
        whitelist:
          tags:
          - AutoinjectorCartridge

# Autoinjector Cartridges

- type: entity
  name: autoinjector cartridge
  parent: BaseItem
  description: Used in a cartridge autoinjector.
  id: BaseAutoinjectorCartridge
  abstract: true
  components:
  - type: Item
    size: Tiny
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/cartridge.rsi
    layers:
    - state: base
    - state: filling
      color: "#ffffff"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
  - type: Tag
    tags:
      - AutoinjectorCartridge
      - SecBeltEquip

- type: entity
  name: adrenaline autoinjector cartridge
  parent: [ BaseSecurityMedicalContraband , BaseAutoinjectorCartridge ]
  description: Contains 7u of epinephrine and 3u of tranexamic acid, used in a cartridge autoinjector.
  id: CartridgeEpinephrine
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#cad8d4"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Epinephrine
        Quantity: 7
      - ReagentId: TranexamicAcid
        Quantity: 3 # Fully stops bleeding

- type: entity
  name: airloss autoinjector cartridge
  parent: [ BaseSecurityMedicalContraband , BaseAutoinjectorCartridge ]
  description: Contains 7u of saline and 3u of dexalin plus, used in a cartridge autoinjector.
  id: CartridgeSaline
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#1776c4"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Saline
        Quantity: 7
      - ReagentId: DexalinPlus
        Quantity: 3

- type: entity
  name: brute autoinjector cartridge
  parent: [ BaseSecurityMedicalContraband , BaseAutoinjectorCartridge ]
  description: Contains 4u of bicaridine, 4u of ibuprofen, 1 unit of salicylic acid and 1u of tranexamic acid, used in a cartridge autoinjector.
  id: CartridgeBicaridine
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#c5932d"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Bicaridine
        Quantity: 4
      - ReagentId: Ibuprofen
        Quantity: 4
      - ReagentId: SalicylicAcid
        Quantity: 1
      - ReagentId: TranexamicAcid
        Quantity: 1 # Stops 30% of maximum bleeding
  #If you have a full dmg spread, it'll heal ~60 dmg , down from previous 96
  #It will heal 20 dmg if you only have one dmg type and you have more than 25 dmg (see salicylic acid)
- type: entity
  name: burn autoinjector cartridge
  parent: [ BaseSecurityMedicalContraband , BaseAutoinjectorCartridge ]
  description: Contains 5u of kelotane, 4u of dermaline 1u of leporazine, used in a cartridge autoinjector.
  id: CartridgeDermaline
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#956960"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Kelotane
        Quantity: 5
      - ReagentId: Dermaline
        Quantity: 4
      - ReagentId: Leporazine #will minorly help with temperature regulation
        Quantity: 1
#what were they cooking here before, 114 total possible dmg heal was crazyyy
#~21 dmg healed/dmg type (unless its cold, then its a lil more), doesnt heal caustic all that well
- type: entity
  name: emergency autoinjector cartridge
  parent: [ BaseSecurityMedicalContraband , BaseAutoinjectorCartridge ]
  description: Contains 10u of atropine, used in a cartridge autoinjector.
  id: CartridgeAtropine
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#572757"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Atropine
        Quantity: 10

- type: entity
  name: piercing autoinjector cartridge
  parent: [ BaseSyndicateContraband , BaseAutoinjectorCartridge ]
  description: Contains 10u of puncturase, used in a cartridge autoinjector.
  id: CartridgePuncturase
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#b9bf93"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Puncturase
        Quantity: 10

- type: entity
  name: stimulant autoinjector cartridge
  parent: [ BaseSyndicateContraband , BaseAutoinjectorCartridge ]
  description: Contains 10u of ephedrine, used in a cartridge autoinjector.
  id: CartridgeEphedrine
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#d2fffa"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Ephedrine
        Quantity: 10

- type: entity
  name: sedative autoinjector cartridge
  parent: [ BaseSyndicateContraband , BaseAutoinjectorCartridge ]
  description: Contains 4u of tirizene, 3u of impedrezene and 3u of haloperidol, used in a cartridge autoinjector.
  id: CartridgeTirizene
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#415130"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Tirizene
        Quantity: 4
      - ReagentId: Impedrezene
        Quantity: 3
      - ReagentId: Haloperidol
        Quantity: 3

# Q - Why is this edible?
# A - Because the dispenser reminded me of a pez dispenser, and it'd be funny if you could eat them.
- type: entity
  name: amnestic autoinjector cartridge
  parent: [ BaseCentcommContraband , BaseAutoinjectorCartridge, EdibleBase ]
  description: Contains 10u of dimtremethic-neuramincyl acid, used in a cartridge autoinjector.
  id: CartridgeAmnestic
  components:
  - type: Sprite
    layers:
    - state: base
    - state: filling
      color: "#FAF9F6"
  - type: SolutionCartridge
    targetSolution: hypospray
    solution:
      maxVol: 10
      reagents:
      - ReagentId: Amnestizine
        Quantity: 10
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Amnestizine
          Quantity: 10
  - type: Food
    delay: 0.2
    forceFeedDelay: 1.5
    transferAmount: null
    eatMessage: food-swallow
    useSound: /Audio/Items/pill.ogg
  - type: BadFood
  - type: FlavorProfile
    ignoreReagents: [ ]

# Medipens

- type: entity
  name: futuristic medipen
  parent: ChemicalMedipen
  id: StasiziumAutoInjector
  suffix: DO NOT MAP
  description: A dose of medicinal substances from the future that can raise even the dead to their feet.
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/stasipen.rsi
    layers:
    - state: stasipen
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    changeColor: false
    emptySpriteName: stasipen_empty
  - type: Hypospray
    solutionName: pen
    transferAmount: 10
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 10
        reagents:
        - ReagentId: Stasizium
          Quantity: 10

- type: entity
  name: centcomm advanced stimulant
  parent: [ChemicalMedipen, BaseCentcommContraband]
  id: CentcommStimpack
  suffix: DO NOT MAP
  description: According to a Nanotrasen funded study, it has zero addictive properties.
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/medipen.rsi
    layers:
    - state: ntstimpen
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 50
        reagents:
        - ReagentId: Stimulants
          Quantity: 25
        - ReagentId: Ichor
          Quantity: 10
        - ReagentId: Dylovene
          Quantity: 15
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    changeColor: false
    emptySpriteName: ntstimpen_empty
  - type: Hypospray
    solutionName: pen
    transferAmount: 50
    onlyAffectsMobs: false
    injectOnly: true
  - type: StaticPrice
    price: 500

- type: entity
  name: biohazard medipen
  parent: ChemicalMedipen
  id: AmbuzolMedipen
  suffix: DO NOT MAP
  description: A safe and effective way to treat infections. Does not prevent re-infection.
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/medipen.rsi
    layers:
    - state: ambuzolpen
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    changeColor: false
    emptySpriteName: ambuzolpen_empty
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15
        reagents:
        - ReagentId: Ambuzol
          Quantity: 10
        - ReagentId: Ultravasculine
          Quantity: 5
  - type: Tag
    tags:
    - Medipen
    - EmergencyMedipen

- type: entity
  name: advanced biohazard medipen
  parent: ChemicalMedipen
  id: AmbuzolPlusMedipen
  suffix: DO NOT MAP
  description: A safer and extremely effective way to treat any infections. Prevents re-infection.
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/medipen.rsi
    layers:
    - state: ambuzolpluspen
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    changeColor: false
    emptySpriteName: ambuzolpen_empty
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 20
        reagents:
        - ReagentId: AmbuzolPlus
          Quantity: 5
        - ReagentId: Diphenhydramine
          Quantity: 15
  - type: Tag
    tags:
    - Medipen
    - EmergencyMedipen

# Actual hyposprays

- type: entity
  name: centcomm hypospray
  parent: [BaseItem, BaseCentcommContraband]
  description: Reserved for Nanotrasen's top doctors. It utilizes experimental bluespace technology.
  id: CentCommHypo
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Specific/Medical/centcomm_hypo.rsi
    state: hypo
  - type: Item
    sprite: _Goobstation/Objects/Specific/Medical/centcomm_hypo.rsi
  - type: SolutionContainerManager
    solutions:
      hypospray:
        maxVol: 50
  - type: RefillableSolution
    solution: hypospray
  - type: ExaminableSolution
    solution: hypospray
  - type: Hypospray
    onlyAffectsMobs: false
  - type: UseDelay
    delay: 0.2
