# SPDX-FileCopyrightText: 2022 Francesco <frafonia@gmail.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Moony <moony@hellomouse.net>
# SPDX-FileCopyrightText: 2023 Morb <14136326+Morb0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Sir Winters <7543955+Owai-Seek@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Fildrance <fildrance@gmail.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 PopGamer46 <yt1popgamer@gmail.com>
# SPDX-FileCopyrightText: 2024 Spessmann <156740760+Spessmann@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 coolboy911 <85909253+coolboy911@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 lunarcomets <140772713+lunarcomets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 pa.pecherskij <pa.pecherskij@interfax.ru>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: [BaseStructure, ConstructibleMachine] # Not a BaseMachinePowered since we don't want the anchorable component
  id: CryoPod
  name: cryo pod
  description: A special machine intended to create a safe environment for the use of chemicals that react in cold environments.
  components:
  - type: Sprite
    sprite: Structures/Machines/Medical/cryopod.rsi
    drawdepth: Mobs
    noRot: true
    offset: 0, 0.5
    layers:
      - sprite: Structures/Piping/Atmospherics/pipe.rsi
        state: pipeHalf
        offset: 0, -0.5
        map: [ "enum.PipeVisualLayers.Pipe" ]
      - state: pod-open
        map: [ "enum.CryoPodVisualLayers.Base" ]
      - state: cover-on
        map: [ "enum.CryoPodVisualLayers.Cover" ]
        visible: false
      - state: pod-panel
        map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
        visible: false
  - type: InteractionOutline
  - type: Transform
    noRot: true
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        density: 200
        mask:
          - MachineMask
        layer:
          - MachineLayer
  - type: ContainerContainer
    containers:
      scanner-body:
        !type:ContainerSlot
        showEnts: true
      beakerSlot: !type:ContainerSlot {}
      machine_board: !type:Container
      machine_parts: !type:Container
  - type: AtmosDevice
  - type: Appearance
  - type: Machine
    board: CryoPodMachineCircuitboard
  - type: WiresVisuals
  - type: WiresPanel
  - type: Wires
    boardName: wires-board-name-cryopod
    layoutId: CryoPod
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: StructuralMetallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:EmptyAllContainersBehaviour
        - !type:PlaySoundBehavior
          sound:
            collection: WindowShatter
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
  - type: ApcPowerReceiver
    powerLoad: 3000
  - type: ExtensionCableReceiver
  - type: NodeContainer
    nodes:
      port:
        !type:PortablePipeNode
        nodeGroupID: Pipe
        pipeDirection: South
  - type: AtmosMonitoringConsoleDevice
    navMapBlip: Thermoregulator
  - type: ItemSlots
    slots:
      beakerSlot:
        whitelist:
          components:
            - FitsInDispenser
  - type: ItemToggle
  - type: HealthAnalyzer
    scanDelay: 0
  - type: UserInterface
    interfaces:
      enum.HealthAnalyzerUiKey.Key:
        type: HealthAnalyzerBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: ActivatableUI
    key: enum.HealthAnalyzerUiKey.Key
    requiresComplex: false
  - type: ActivatableUIRequiresPower
  - type: PointLight
    color: "#3a807f"
    radius: 2
    energy: 10
    enabled: false
  - type: EmptyOnMachineDeconstruct
    containers:
      - scanner-body
  - type: CryoPod
  - type: CryoPodAir
  - type: ContainerTemperatureDamageThresholds
    coldDamageThreshold: 10
  - type: GuideHelp
    guides:
    - Cryogenics