# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 rolfero <45628623+rolfero@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 degradka <69397649+degradka@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: Vaccinator
  parent: BaseMachinePowered
  name: vaccinator
  description: A machine that creates vaccines.
  placement:
    mode: SnapgridCenter
  components:
  - type: Sprite
    sprite: Structures/Machines/vaccinator.rsi
    layers:
    - state: icon
    - state: unlit
      shader: unshaded
  # <Goobstation>
      map: ["enum.PowerDeviceVisualLayers.Powered"]
    - state: running
      visible: false
      map: ["running"]
  - type: Appearance
  - type: Machine
    board: VaccinatorMachineCircuitboard
  - type: RequireProjectileTarget
  - type: ItemSlots
    slots:
      disease_swab_slot:
        name: Swab
        whitelist:
          components:
          - DiseaseSwab
  - type: VirologyMachine
    idleState: icon
    runningState: running
    analysisDuration: 20
    vaccinator: true
    swabSlot:
      occludesLight: True
      insertSound: !type:SoundPathSpecifier
        path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg
      ejectSound: !type:SoundPathSpecifier
        path: /Audio/Weapons/Guns/MagOut/revolver_magout.ogg
      insertOnInteract: True
      swap: True
      whitelist:
        requireAll: False
        components:
        - DiseaseSwab
  - type: ContainerContainer
    containers:
      disease_swab_slot: !type:ContainerSlot
        showEnts: False
        occludes: True
        ent: null
      machine_board: !type:Container
        showEnts: False
        occludes: True
        ents: []
      machine_parts: !type:Container
        showEnts: False
        occludes: True
        ents: []
  - type: GenericVisualizer
    visuals:
      enum.PowerDeviceVisuals.Powered:
        enum.PowerDeviceVisualLayers.Powered:
          True: { visible: true }
          False: { visible: false }
      enum.DiseaseMachineVisuals.IsRunning:
        running:
          True: { visible: true }
          False: { visible: false }
  # </Goobstation>
