- type: entity
  parent: BaseStructure
  id: CryogenicSleepUnit
  name: cryogenic sleep unit
  description: A super-cooled container that keeps crewmates safe during space travel.
  components:
  - type: Anchorable
    flags:
    - Anchorable
  - type: Rotatable
  - type: Sprite
    noRot: true
    sprite: Structures/cryostorage.rsi
    layers:
    - state: sleeper_0
      map: ["base"]
  - type: UserInterface
    interfaces:
      enum.CryostorageUIKey.Key:
        type: CryostorageBoundUserInterface
  - type: ActivatableUI
    key: enum.CryostorageUIKey.Key
  - type: AccessReader
    breakOnAccessBreaker: false
    access: [["Cryogenics"]]
    examinationText: access-reader-examination-functionality-restricted
  - type: InteractionOutline
  - type: Cryostorage
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.05"
        density: 190
        mask:
        - TableMask
  - type: DragInsertContainer
    containerId: storage
    entryDelay: 2
  - type: ExitContainerOnMove
    containerId: storage
  - type: PointLight
    color: Lime
    radius: 4.5  # starcup: 1.5 -> 4.5
    energy: 0.05  # starcup: 0.5 -> 0.05
    castShadows: false
  - type: ContainerContainer
    containers:
      storage: !type:ContainerSlot
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.CryostorageVisuals.Full:
        base:
          True: { state: sleeper_1 }
          False: { state: sleeper_0 }

# This one handles all spawns, latejoin and roundstart.
- type: entity
  parent: CryogenicSleepUnit
  id: CryogenicSleepUnitSpawner
  suffix: Spawner, Roundstart AllJobs
  components:
  - type: ContainerSpawnPoint
    containerId: storage

# This one only handles latejoin spawns.
- type: entity
  parent: CryogenicSleepUnit
  id: CryogenicSleepUnitSpawnerLateJoin
  suffix: Spawner, LateJoin
  components:
    - type: ContainerSpawnPoint
      containerId: storage
      spawnType: LateJoin
