CÓQÒQ# Base item
- type: entity
  abstract: true
  parent: BaseItem
  id: CMEncryptionKey
  name: standard encryption key
  description: An encryption key for a radio headset.
  components:
  - type: EncryptionKey
  - type: Item
    size: Tiny
    sprite: _RMC14/Objects/Devices/encryption_keys.rsi
  - type: Sprite
    sprite: _RMC14/Objects/Devices/encryption_keys.rsi
    state: cypherkey


# Common
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyCommon
  name: public radio encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommon
    defaultChannel: MarineCommon
  - type: Sprite
    state: stripped_key

# Colony
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyColony
  name: colony encryption Key
  components:
  - type: EncryptionKey
    channels:
    - Colony
    defaultChannel: Colony
  - type: Sprite
    state: stripped_key

# We-Ya
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyWEYA
  name: we-ya encryption Key
  components:
  - type: EncryptionKey
    channels:
    - WEYA
    defaultChannel: WEYA
  - type: Sprite
    state: we_ya_key

- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyWEYAColony
  name: we-ya colony encryption Key
  components:
  - type: EncryptionKey
    channels:
    - WEYA
    - Colony
    defaultChannel: WEYA
  - type: Sprite
    state: we_ya_key

- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyICB
  name: ICB encryption Key
  components:
  - type: EncryptionKey
    channels:
    - CMB
    - WEYA
    - MarineCommand
    - MarineMedical
    - MarineIntel
    - MarineCommon
    - Colony
    defaultChannel: CMB
  - type: Sprite
    state: we_ya_key

# Command
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyCommand
  name: command encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    defaultChannel: MarineCommand
  - type: Sprite
    state: cap_key

# High Command
- type: entity
  parent: CMEncryptionKey
  id: RMCEncryptionKeyHighCommand
  name: high command encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineHighCommand
    defaultChannel: MarineHighCommand
  - type: Sprite
    state: cap_key

# JTAC
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyJTAC
  name: JTAC radio encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineJTAC
    - MarineRequisition
    defaultChannel: MarineJTAC
  - type: Sprite
    state: jtac_key

# Intel
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyIntel
  name: intel radio encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineIntel
    defaultChannel: MarineIntel
  - type: Sprite
    state: jtac_key

# COMMAND
# Senior Command
- type: entity
  parent: CMEncryptionKey
  id: RMCEncryptionKeySeniorCommand
  name: marine senior command radio encryption key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineMilitaryPolice
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    - MarineEngineer
    - MarineMedical
    - MarineRequisition
    - MarineJTAC
    - MarineIntel
    defaultChannel: MarineCommand
  - type: Sprite
    state: cmp_key

# Marine Command
- type: entity
  parent: CMEncryptionKey
  id: RMCEncryptionKeyMarineCommand
  name: marine command radio encryption key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    - MarineEngineer
    - MarineMedical
    - MarineRequisition
    - MarineJTAC
    - MarineIntel
    defaultChannel: MarineCommand
  - type: Sprite
    state: cap_key

# Marine Command Alternative
- type: entity
  parent: RMCEncryptionKeyMarineCommand
  id: RMCEncryptionKeyMarineCommandAlternative
  suffix: Alternative
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineEngineer
    - MarineMedical
    - MarineRequisition
    - MarineJTAC
    - MarineIntel
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    defaultChannel: MarineCommand


# ENGINEERING
# Engineering
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyEngineer
  name: engineering encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineEngineer
    defaultChannel: MarineEngineer
  - type: Sprite
    state: eng_key

# CE
- type: entity
  parent: CMEncryptionKeyEngineer
  id: CMEncryptionKeyCE
  name: chief engineer's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineEngineer
    - MarineCommand
    - MarineRequisition
    - MarineMedical
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    defaultChannel: MarineEngineer
  - type: Sprite
    state: ce_key


# MEDICAL
# Medical
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyMedical
  name: medical encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineMedical
    defaultChannel: MarineMedical
  - type: Sprite
    state: med_key

# CMO
- type: entity
  parent: CMEncryptionKeyMedical
  id: CMEncryptionKeyCMO
  name: chief medical officer's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineMedical
    - MarineCommand
    - MarineIntel
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    - MarineEngineer
    defaultChannel: MarineMedical

# Research
- type: entity
  parent: CMEncryptionKeyMedical
  id: CMEncryptionKeyResearcher
  name: researcher's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineMedical
    - MarineIntel
    defaultChannel: MarineMedical


# MILITARY POLICE
# milpol
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyMilitaryPolice
  name: military police encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineMilitaryPolice
    defaultChannel: MarineMilitaryPolice
  - type: Sprite
    state: sec_key

# CMP
- type: entity
  parent: CMEncryptionKeyMilitaryPolice
  id: CMEncryptionKeyCMP
  name: chief military police encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineMilitaryPolice
    - MarineEngineer
    - MarineMedical
    - MarineRequisition
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    defaultChannel: MarineMilitaryPolice
  - type: Sprite
    state: cmp_key

# MilPol officer
- type: entity
  parent: CMEncryptionKeyMilitaryPolice
  id: CMEncryptionKeyMPO
  name: military police officer's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineMilitaryPolice
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    - MarineEngineer
    - MarineMedical
    defaultChannel: MarineMilitaryPolice


# REQUISITION
# Requisition
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyRequisition
  name: requisition encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineRequisition
    defaultChannel: MarineRequisition
  - type: Sprite
    state: req_key

# Quartermaster
- type: entity
  parent: CMEncryptionKeyRequisition
  id: RMCEncryptionKeyQuartermaster
  name: requisition encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineRequisition
    - MarineCommand
    - MarineEngineer
    - MarineMedical
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    defaultChannel: MarineRequisition
  - type: Sprite
    state: ce_key

# SUPPORT
# Corporate Liaison
- type: entity
  parent: CMEncryptionKey
  id: RMCEncryptionKeyLiaison
  name: corporate liaison radio encryption key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineEngineer
    - MarineMedical
    - MarineRequisition
    - MarineJTAC
    - MarineIntel
    - WEYA
    defaultChannel: WEYA
  - type: Sprite
    state: cap_key

# Dropship and gunship pilots
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyPilot
  name: pilot's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineEngineer
    - MarineJTAC
    - MarineMedical
    - MarineIntel
    defaultChannel: MarineCommand
  - type: Sprite
    state: cap_key

# Intel Officer
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyIntelOfficer
  name: intel officer's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommon
    - MarineCommand
    - MarineEngineer
    - MarineJTAC
    - MarineMedical
    defaultChannel: MarineCommon
  - type: Sprite
    state: cap_key

# Vehicle Crewman
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyCrewman
  name: vehicle crewman's encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineEngineer
    - MarineMedical
    - MarineRequisition
    defaultChannel: MarineCommand
  - type: Sprite
    state: cap_key


# All Squads
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyMasterSquad
  name: master squad encryption key
  components:
  - type: EncryptionKey
    channels:
    - MarineAlpha
    - MarineBravo
    - MarineCharlie
    - MarineDelta
    - MarineEcho
    - MarineFoxtrot
    defaultChannel: MarineAlpha

# All Almayer
- type: entity
  parent: CMEncryptionKey
  id: CMEncryptionKeyMasterShip
  name: master ship encryption Key
  components:
  - type: EncryptionKey
    channels:
    - MarineCommand
    - MarineCommon
    - MarineMilitaryPolice
    - MarineMedical
    - MarineEngineer
    - MarineRequisition
    - MarineIntel
    defaultChannel: MarineCommand
CêGéG- type: entity
  abstract: true
  parent: ChemicalMedipen
  id: CMAutoInjector
  name: autoinjector
  description: An autoinjector.
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/auto_injectors.rsi
    layers:
    - state: autoinjector
    - state: autoinjector1
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: false
  - type: Item
    size: Small
    sprite: null
  - type: Hypospray
    solutionName: pen
    injectSound: /Audio/_RMC14/Medical/hypospray.ogg
    transferAmount: 15
    injectOnly: true
    onlyAffectsMobs: true
    canContainerDraw: false
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
  - type: SolutionContainerVisuals
    maxFillLevels: 3
    fillBaseName: autoinjector
    emptySpriteName: autoinjector
    changeColor: true
  - type: CMRefillableSolution
    solution: pen
    reagents: {}
  - type: Tag
    tags:
    - CMAutoInjector
  - type: MedicallyUnskilledDoAfter
  - type: UseDelay
    delay: 0.333
  - type: IconLabel
    textColor: White
    storedOffset: 0, 12

- type: entity
  parent: CMAutoInjector
  id: CMEmergencyAutoInjector
  name: emergency autoinjector (CAUTION)
  description: An autoinjector loaded with a special cocktail of chemicals, to be used in life-threatening situations. Doesn't require any training to use.
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/emergency_auto_injector.rsi
    layers:
    - state: autoinjector
    - state: autoinjector1
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: false
  - type: Item
    sprite: null
  - type: Hypospray
    transferAmount: 58 # TODO RMC14 77
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 58 # TODO RMC14 77
        reagents:
        - ReagentId: CMBicaridine
          Quantity: 29
        - ReagentId: CMKelotane
          Quantity: 29
#        - ReagentId: CMOxycodone # TODO RMC14 oxycodone
#          Quantity: 19
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    changeColor: false
  - type: MedicallyUnskilledDoAfter
    min: 0
    doAfter: 0
  - type: IconLabel
    labelTextLocId: rmc-emergency-medicine-container-label-text

- type: entity
  parent: CMAutoInjector
  id: CMTricordrazineAutoInjector
  name: tricordrazine autoinjector
  description: An autoinjector loaded with 3 uses of Tricordrazine, a weak general use medicine for treating damage.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
        reagents:
        - ReagentId: CMTricordrazine
          Quantity: 45
  - type: CMRefillableSolution
    reagents:
      CMTricordrazine: 45
  - type: IconLabel
    labelTextLocId: rmc-tricordazine-container-label-text

- type: entity
  parent: CMTricordrazineAutoInjector
  id: CMTricordrazineAutoInjectorNoSkill
  name: first-aid autoinjector
  description: An autoinjector loaded with a small dose of medicine for marines to treat themselves with.
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/auto_injectors.rsi
    layers:
    - state: tricord
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: MedicallyUnskilledDoAfter
    min: 0
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15
        reagents:
        - ReagentId: CMTricordrazine
          Quantity: 15
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    emptySpriteName: tricord0
    fillBaseName: tricord
    changeColor: false
  - type: CMRefillableSolution
    reagents:
      CMTricordrazine: 15
  - type: IconLabel
    labelTextLocId: rmc-first-aid-container-label-text

- type: entity
  parent: CMAutoInjector
  id: CMKelotaneAutoInjector
  name: kelotane autoinjector
  description: An autoinjector loaded with 3 uses of Kelotane, a common burn medicine.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
        reagents:
        - ReagentId: CMKelotane
          Quantity: 45
  - type: CMRefillableSolution
    reagents:
      CMKelotane: 45
  - type: IconLabel
    labelTextLocId: rmc-kelotane-container-label-text

- type: entity
  parent: CMAutoInjector
  id: CMDexalinPlusAutoInjector
  name: dexalin plus autoinjector
  description: An autoinjector loaded with 3 uses of Dexalin+, designed to immediately oxygenate the entire body.
  components:
  - type: Hypospray
    transferAmount: 1
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 3
        reagents:
        - ReagentId: CMDexalinPlus
          Quantity: 3
  - type: CMRefillableSolution
    reagents:
      CMDexalinPlus: 3
  - type: IconLabel
    labelTextLocId: rmc-dexalin-plus-container-label-text
# TODO RMC14 tramadol

- type: entity
  parent: CMAutoInjector
  id: CMBicaridineAutoInjector
  name: bicaridine autoinjector
  description: An autoinjector loaded with 3 uses of Bicaridine, a common brute and circulatory damage medicine.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
        reagents:
        - ReagentId: CMBicaridine
          Quantity: 45
  - type: CMRefillableSolution
    reagents:
      CMBicaridine: 45
  - type: IconLabel
    labelTextLocId: rmc-bicaridine-container-label-text
- type: entity
  parent: CMAutoInjector
  id: CMInaprovalineAutoInjector
  name: inaprovaline autoinjector
  description: An autoinjector loaded with 3 uses of Inaprovaline, an emergency stabilization medicine for patients in critical condition.
  components:
  - type: Hypospray
    transferAmount: 30
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMInaprovaline
          Quantity: 90
  - type: CMRefillableSolution
    reagents:
      CMInaprovaline: 90
  - type: IconLabel
    labelTextLocId: rmc-inaprovaline-container-label-text

# TODO RMC14 oxycodone

- type: entity
  parent: CMAutoInjector
  id: CMEpinephrineAutoInjector
  name: epinephrine autoinjector
  description: An autoinjector loaded with 3 uses of Epinephrine, better known as Adrenaline, a nerve stimulant useful in restarting the heart.
  components:
  - type: Hypospray
    transferAmount: 5.25
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15.75
        reagents:
        - ReagentId: CMEpinephrine
          Quantity: 15.75
  - type: CMRefillableSolution
    reagents:
      CMEpinephrine: 15.75
  - type: IconLabel
    labelTextLocId: rmc-epinephrine-container-label-text

- type: entity
  parent: CMAutoInjector
  id: RMCMedicAutoInjector
  name: medic autoinjector (M-M)
  description: A custom-made professional injector, likely from research. Has a similar lock to pill bottles, and fits up to 6 injections.
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/medic_auto_injector.rsi
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
  - type: SolutionContainerVisuals
    maxFillLevels: 6
  - type: Tag
    tags:
    - RMCAutoInjectorMedical
  - type: RefillableSolution
    solution: pen
  - type: RequiresSkill
    skills:
      RMCSkillMedical: 2

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorEZ15
  name: EZ autoinjector (e-t)
  description: A custom-made EZ autoinjector, likely from research. Injects its entire payload immediately and doesn't require any training.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15
  - type: MedicallyUnskilledDoAfter
    min: 0

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorBicaridine
  suffix: Bicaridine
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMBicaridine
          Quantity: 90

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorKelotane
  suffix: Kelotane
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMKelotane
          Quantity: 90

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorTricordrazineRevival
  suffix: Tricordrazine - Revival
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMEpinephrine
          Quantity: 30
        - ReagentId: CMInaprovaline
          Quantity: 30
        - ReagentId: CMTricordrazine
          Quantity: 30

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorTricordrazine
  suffix: Tricordrazine
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMTricordrazine
          Quantity: 90

- type: Tag
  id: CMAutoInjector

- type: Tag
  id: RMCAutoInjectorMedical
Câá# Divide original costs by 37.5 each - except plastic which is 20
- type: latheRecipe
  id: CMSyringe
  result: CMSyringe
  completetime: 4
  materials:
    CMGlass: 4 # 150

- type: latheRecipe
  id: RMCDropper
  result: RMCDropper
  completetime: 4
  materials:
    RMCPlastic: 8 # 150

- type: latheRecipe
  id: CMHypospray
  result: CMHyposprayWithVial
  completetime: 4
  materials:
    RMCPlastic: 63 # 1250
    CMGlass: 7 # 250

- type: latheRecipe
  id: CMBloodPack
  result: CMBloodPack
  completetime: 4
  materials:
    RMCPlastic: 25 # 500

- type: latheRecipe
  id: RMCBeakerHighCapacity
  result: RMCBeakerHighCapacity
  completetime: 4
  materials:
    CMGlass: 267 # 10000

- type: latheRecipe
  id: CMBonesetter
  result: CMBonesetter
  completetime: 4
  materials:
    RMCPlastic: 375 # 7500

- type: latheRecipe
  id: CMStasisBag
  result: CMStasisBagFolded
  completetime: 4
  materials:
    RMCPlastic: 375 # 7500

- type: latheRecipe
  id: CMRollerBed
  result: CMRollerBedSpawnFolded
  completetime: 4
  materials:
    RMCPlastic: 250 # 5000

- type: latheRecipe
  id: CMPillCanister
  result: CMPillCanister
  completetime: 4
  materials:
    RMCPlastic: 25 # 500

- type: latheRecipe
  id: CMFirstAidKit
  result: CMFirstAidKit
  completetime: 4
  materials:
    RMCPlastic: 50 # 1000

- type: latheRecipe
  id: CMBurnAidKit
  result: CMBurnAidKit
  completetime: 4
  materials:
    RMCPlastic: 50 # 1000

- type: latheRecipe
  id: CMToxinAidKit
  result: CMToxinAidKit
  completetime: 4
  materials:
    RMCPlastic: 50 # 1000

- type: latheRecipe
  id: CMAdvFirstAidKit
  result: CMAdvFirstAidKit
  completetime: 4
  materials:
    RMCPlastic: 50 # 1000

- type: latheRecipe
  id: CMFirstAidO2Kit
  result: CMFirstAidO2Kit
  completetime: 4
  materials:
    RMCPlastic: 50 # 1000

- type: latheRecipe
  id: RMCVialBox
  result: RMCVialBox
  completetime: 4
  materials:
    RMCPlastic: 100 # 2000

- type: latheRecipe
  id: RMCSurgicalTrayEmpty
  result: RMCSurgicalTrayEmpty
  completetime: 4
  materials:
    RMCPlastic: 150 # 3000

- type: latheRecipe
  id: RMCPouchReagentCanister
  result: RMCPouchReagentCanister
  completetime: 4
  materials:
    CMGlass: 67 # 2500
    RMCPlastic: 125 # 2500

- type: latheRecipe
  id: RMCPressurizedCanister
  result: RMCPressurizedCanister
  completetime: 4
  materials:
    CMGlass: 67 # 2500

- type: latheRecipe
  id: RMCMedicAutoInjector
  result: RMCMedicAutoInjector
  completetime: 4
  materials:
    RMCPlastic: 19 # 375

- type: latheRecipe
  id: RMCMedicAutoInjectorEZ15
  result: RMCMedicAutoInjectorEZ15
  completetime: 4
  materials:
    RMCPlastic: 19 # 375

Cµ ´ - type: entity
  parent: BaseMachinePowered
  id: RMCMedilathe
  name: medilathe
  suffix: Right Output
  description: A specialized autolathe made for printing medical items.
  components:
  - type: ApcPowerReceiver
    powerLoad: 0
    needsPower: false
  - type: RequiresSkill
    skills:
      RMCSkillMedical: 3
  - type: Sprite
    sprite: _RMC14/Structures/Machines/medilathe.rsi
    layers:
    - state: medilathe
      map: ["enum.LatheVisualLayers.IsRunning"]
      offset: -0.5, 0
    - state: medilathe_u
      shader: unshaded
      map: ["enum.PowerDeviceVisualLayers.Powered"]
      offset: -0.5, 0
    - state: medilathe_t
      map: ["enum.WiresVisualLayers.MaintenancePanel"]
      offset: -0.5, 0
  - type: Appearance
  - type: WiresVisuals
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-1.5,-0.5,0.5,0.5"
        density: 190
        mask:
        - MachineMask
        layer:
        - MachineLayer
  - type: Lathe
    idleState: medilathe
    runningState: medilathe_n
    unlitIdleState: medilathe_u
    unlitRunningState: medilathe_n_u
    producingSound: /Audio/_RMC14/Machines/print.ogg
    staticRecipes:
    - CMBeaker
    - CMBeakerLarge
#    - Drinking glass (625 glass)
    - CMSyringe
    - RMCDropper
#    - RMC Spray bottle (500 plastic)
#    - Autoinjector (C-T) (300 Plastic)
#    - Autoinjector (C-S) (300 Plastic)
#    - Autoinjector (C-M) (300 Plastic)
#    - Autoinjector (C-L) (300 Plastic)
#    - EZ Autoinjector (E-U) (300 Plastic)
#    - EZ Autoinjector (E-VS) (300 Plastic)
#    - EZ Autoinjector (E-S) (300 Plastic)
    - RMCMedicAutoInjectorEZ15
#    - EZ Autoinjector (E-M) (300 Plastic)
#    - EZ Autoinjector (E-L) (300 Plastic)
#    - EZ Autoinjector (E-XL) (300 Plastic)
    - RMCMedicAutoInjector
#    - Medic Autoinjector (M-L) (300 Plastic)
    - CMHypospray
    - CMBloodPack
    - RMCBeakerHighCapacity
    - CMBonesetter
#    - FixOVein (5000 Plastic)
    - CMStasisBag
    - CMRollerBed
    - CMPillCanister
    - CMFirstAidKit
    - CMBurnAidKit
    - CMToxinAidKit
    - CMAdvFirstAidKit
    - CMFirstAidO2Kit
#    - Radiation First Aid Kit (2000 Plastic)
#    - Syringe Case (1000 Plastic)
    - RMCSurgicalTrayEmpty
    - RMCVialBox
    - RMCPouchReagentCanister
    - RMCPressurizedCanister
  - type: MaterialStorage
    whitelist:
      tags:
      - Plastic
      - RMCGlass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: WiresPanel
  - type: ActivatableUI
    key: enum.LatheUiKey.Key
  - type: ActivatableUIRequiresPower
  - type: UserInterface
    interfaces:
      enum.LatheUiKey.Key:
        type: LatheBoundUserInterface
      enum.ResearchClientUiKey.Key:
        type: ResearchClientBoundUserInterface
  - type: Transform
    anchored: true
  - type: Corrodible
    isCorrodible: false
  - type: ActivatableUIBlacklist
    blacklist:
      components:
      - Xeno

- type: entity
  parent: RMCMedilathe
  id: RMCMedilatheLeft
  suffix: Left Output
  components:
  - type: Sprite
    sprite: _RMC14/Structures/Machines/medilathe.rsi
    layers:
    - state: medilathe_f
      map: ["enum.LatheVisualLayers.IsRunning"]
      offset: 0.5, 0
    - state: medilathe_u_f
      shader: unshaded
      map: ["enum.PowerDeviceVisualLayers.Powered"]
      offset: 0.5, 0
    - state: medilathe_t_f
      map: ["enum.WiresVisualLayers.MaintenancePanel"]
      offset: 0.5, 0
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,1.5,0.5"
        density: 190
        mask:
        - MachineMask
        layer:
        - MachineLayer
  - type: Lathe
    idleState: medilathe_f
    runningState: medilathe_n_f
    unlitIdleState: medilathe_u_f
    unlitRunningState: medilathe_n_u_f
CªH©H- type: entity
  abstract: true
  parent: ChemicalMedipen
  id: CMAutoInjector
  name: autoinjector
  description: An autoinjector.
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/auto_injectors.rsi
    layers:
    - state: autoinjector
    - state: autoinjector1
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: false
  - type: Item
    size: Small
    sprite: null
  - type: Hypospray
    solutionName: pen
    injectSound: /Audio/_RMC14/Medical/hypospray.ogg
    transferAmount: 15
    injectOnly: true
    onlyAffectsMobs: true
    canContainerDraw: false
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
  - type: SolutionContainerVisuals
    maxFillLevels: 3
    fillBaseName: autoinjector
    emptySpriteName: autoinjector
    changeColor: true
  - type: CMRefillableSolution
    solution: pen
    reagents: {}
  - type: Tag
    tags:
    - CMAutoInjector
  - type: MedicallyUnskilledDoAfter
  - type: UseDelay
    delay: 0.333
  - type: IconLabel
    textColor: White
    storedOffset: 0, 12

- type: entity
  parent: CMAutoInjector
  id: CMEmergencyAutoInjector
  name: emergency autoinjector (CAUTION)
  description: An autoinjector loaded with a special cocktail of chemicals, to be used in life-threatening situations. Doesn't require any training to use.
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/emergency_auto_injector.rsi
    layers:
    - state: autoinjector
    - state: autoinjector1
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: false
  - type: Item
    sprite: null
  - type: Hypospray
    transferAmount: 58 # TODO RMC14 77
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 58 # TODO RMC14 77
        reagents:
        - ReagentId: CMBicaridine
          Quantity: 29
        - ReagentId: CMKelotane
          Quantity: 29
#        - ReagentId: CMOxycodone # TODO RMC14 oxycodone
#          Quantity: 19
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    changeColor: false
  - type: MedicallyUnskilledDoAfter
    min: 0
    doAfter: 0
  - type: IconLabel
    labelTextLocId: rmc-emergency-medicine-container-label-text

- type: entity
  parent: CMAutoInjector
  id: CMTricordrazineAutoInjector
  name: tricordrazine autoinjector
  description: An autoinjector loaded with 3 uses of Tricordrazine, a weak general use medicine for treating damage.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
        reagents:
        - ReagentId: CMTricordrazine
          Quantity: 45
  - type: CMRefillableSolution
    reagents:
      CMTricordrazine: 45
  - type: IconLabel
    labelTextLocId: rmc-tricordazine-container-label-text

- type: entity
  parent: CMTricordrazineAutoInjector
  id: CMTricordrazineAutoInjectorNoSkill
  name: first-aid autoinjector
  description: An autoinjector loaded with a small dose of medicine for marines to treat themselves with.
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/auto_injectors.rsi
    layers:
    - state: tricord
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: MedicallyUnskilledDoAfter
    min: 0
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15
        reagents:
        - ReagentId: CMTricordrazine
          Quantity: 15
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    emptySpriteName: tricord0
    fillBaseName: tricord
    changeColor: false
  - type: CMRefillableSolution
    reagents:
      CMTricordrazine: 15
  - type: IconLabel
    labelTextLocId: rmc-first-aid-container-label-text

- type: entity
  parent: CMAutoInjector
  id: CMKelotaneAutoInjector
  name: kelotane autoinjector
  description: An autoinjector loaded with 3 uses of Kelotane, a common burn medicine.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
        reagents:
        - ReagentId: CMKelotane
          Quantity: 45
  - type: CMRefillableSolution
    reagents:
      CMKelotane: 45
  - type: IconLabel
    labelTextLocId: rmc-kelotane-container-label-text

- type: entity
  parent: CMAutoInjector
  id: CMDexalinPlusAutoInjector
  name: dexalin plus autoinjector
  description: An autoinjector loaded with 3 uses of Dexalin+, designed to immediately oxygenate the entire body.
  components:
  - type: Hypospray
    transferAmount: 1
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 3
        reagents:
        - ReagentId: CMDexalinPlus
          Quantity: 3
  - type: CMRefillableSolution
    reagents:
      CMDexalinPlus: 3
  - type: IconLabel
    labelTextLocId: rmc-dexalin-plus-container-label-text
# TODO RMC14 tramadol

- type: entity
  parent: CMAutoInjector
  id: CMBicaridineAutoInjector
  name: bicaridine autoinjector
  description: An autoinjector loaded with 3 uses of Bicaridine, a common brute and circulatory damage medicine.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 45
        reagents:
        - ReagentId: CMBicaridine
          Quantity: 45
  - type: CMRefillableSolution
    reagents:
      CMBicaridine: 45
  - type: IconLabel
    labelTextLocId: rmc-bicaridine-container-label-text
- type: entity
  parent: CMAutoInjector
  id: CMInaprovalineAutoInjector
  name: inaprovaline autoinjector
  description: An autoinjector loaded with 3 uses of Inaprovaline, an emergency stabilization medicine for patients in critical condition.
  components:
  - type: Hypospray
    transferAmount: 30
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMInaprovaline
          Quantity: 90
  - type: CMRefillableSolution
    reagents:
      CMInaprovaline: 90
  - type: IconLabel
    labelTextLocId: rmc-inaprovaline-container-label-text

# TODO RMC14 oxycodone

- type: entity
  parent: CMAutoInjector
  id: CMEpinephrineAutoInjector
  name: epinephrine autoinjector
  description: An autoinjector loaded with 3 uses of Epinephrine, better known as Adrenaline, a nerve stimulant useful in restarting the heart.
  components:
  - type: Hypospray
    transferAmount: 5.25
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15.75
        reagents:
        - ReagentId: CMEpinephrine
          Quantity: 15.75
  - type: CMRefillableSolution
    reagents:
      CMEpinephrine: 15.75
  - type: IconLabel
    labelTextLocId: rmc-epinephrine-container-label-text

- type: entity
  parent: CMAutoInjector
  id: RMCMedicAutoInjector
  name: medic autoinjector (M-M)
  description: A custom-made professional injector, likely from research. Has a similar lock to pill bottles, and fits up to 6 injections.
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Medical/medic_auto_injector.rsi
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
  - type: SolutionContainerVisuals
    maxFillLevels: 6
  - type: Tag
    tags:
    - RMCAutoInjectorMedical
  - type: RefillableSolution
    solution: pen
  - type: RequiresSkill
    skills:
      RMCSkillMedical: 2

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorEZ15
  name: EZ autoinjector (e-t)
  description: A custom-made EZ autoinjector, likely from research. Injects its entire payload immediately and doesn't require any training.
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 15
  - type: MedicallyUnskilledDoAfter
    min: 0
  - type: RequiresSkill
    skills:
      RMCSkillMedical: 0

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorBicaridine
  suffix: Bicaridine
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMBicaridine
          Quantity: 90

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorKelotane
  suffix: Kelotane
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMKelotane
          Quantity: 90

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorTricordrazineRevival
  suffix: Tricordrazine - Revival
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMEpinephrine
          Quantity: 30
        - ReagentId: CMInaprovaline
          Quantity: 30
        - ReagentId: CMTricordrazine
          Quantity: 30

- type: entity
  parent: RMCMedicAutoInjector
  id: RMCMedicAutoInjectorTricordrazine
  suffix: Tricordrazine
  components:
  - type: SolutionContainerManager
    solutions:
      pen:
        maxVol: 90
        reagents:
        - ReagentId: CMTricordrazine
          Quantity: 90

- type: Tag
  id: CMAutoInjector

- type: Tag
  id: RMCAutoInjectorMedical
