- type: entity
  id: Jukebox
  name: jukebox
  parent: [ BaseMachinePowered, ConstructibleMachine ]
  description: A machine capable of playing a wide variety of tunes. Enjoyment not guaranteed.
  components:
  - type: StationAiWhitelist
  - type: Sprite
    sprite: Structures/Machines/jukebox.rsi
    layers:
    - state: "off"
      map: ["enum.JukeboxVisualLayers.Base"]
  - type: Transform
    anchored: true
  - type: Jukebox
    onState: on
    offState: off
    selectState: select
  - type: Machine
    board: JukeboxCircuitBoard
  - type: Appearance
  - type: ApcPowerReceiver
    powerLoad: 100
  - type: ExtensionCableReceiver
  - type: ActivatableUI
    key: enum.JukeboxUiKey.Key
  - type: ActivatableUIRequiresPower
  - type: UserInterface
    interfaces:
        enum.JukeboxUiKey.Key:
          type: JukeboxBoundUserInterface
        enum.WiresUiKey.Key:
          type: WiresBoundUserInterface
        enum.StorageUiKey.Key: # Frontier
          type: StorageBoundUserInterface # Frontier
  - type: WiresPanel
  - type: Wires
    boardName: wires-board-name-jukebox
    layoutId: Jukebox
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 75
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 2
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.45,0.25,0.45"
        mask:
        - MachineMask
        layer:
        - MachineLayer
        density: 200
  # Frontier: Music Discs
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      storagebase: !type:Container
  - type: Storage
    maxItemSize: Normal
    grid:
    - 0,0,7,5
    openOnActivate: false
    whitelist:
      components:
      - JukeboxContainer
  - type: StorageFill
    contents:
    - id: NanotrasenRecord
  - type: EmptyOnMachineDeconstruct
    containers:
      - storagebase
  # End Frontier: Music Discs
