- type: entity
  name: baseinstrument
  id: BasePlaceableInstrument
  parent: BaseStructureDynamic
  abstract: true
  components:
  - type: Instrument
  - type: ActivatableUI
    allowSpectator: false # otherwise they can play client-side music
    inHandsOnly: false
    singleUser: true
    verbText: verb-instrument-openui
    key: enum.InstrumentUiKey.Key
  - type: InteractionOutline
  - type: Sprite
    sprite: Structures/Furniture/instruments.rsi
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: UserInterface
    interfaces:
    - key: enum.InstrumentUiKey.Key
      type: InstrumentBoundUserInterface

- type: entity
  parent: BasePlaceableInstrument
  id: BasePlaceableInstrumentRotatable
  name: baseinstrumentrotatable
  abstract: true
  components:
  - type: Rotatable
    rotateWhileAnchored: true

- type: entity
  name: piano
  parent: BasePlaceableInstrumentRotatable
  id: PianoInstrument
  description: Play Needles Piano Now.
  components:
  - type: Instrument
    program: 1
  - type: Sprite
    state: piano
  - type: Climbable

- type: entity
  name: upright piano
  parent: BasePlaceableInstrumentRotatable
  id: UprightPianoInstrument
  description: I said Piannie!
  components:
  - type: Instrument
    program: 3
  - type: Sprite
    state: piano-upright
  - type: Climbable

- type: entity
  name: minimoog
  parent: BasePlaceableInstrumentRotatable
  id: MinimoogInstrument
  description: This is a minimoog, like a space piano, but more spacey!
  components:
  - type: Instrument
    program: 81
  - type: Sprite
    state: minimoog

- type: entity
  name: church organ
  parent: BasePlaceableInstrumentRotatable
  id: ChurchOrganInstrument
  description: This thing really blows!
  components:
  - type: Instrument
    program: 19
  - type: Sprite
    state: church-organ

- type: entity
  parent: BasePlaceableInstrument
  id: DawInstrument
  name: digital audio workstation
  description: Cutting edge music technology, straight from the 90s.
  components:
  - type: Sprite
    layers:
    - state: daw-base
    - state: daw-display
      shader: unshaded
    - state: daw-panel
      map: ["enum.WiresVisualLayers.MaintenancePanel"]
  - type: Appearance
    visuals:
    - type: WiresVisualizer
  - type: Construction
    graph: Machine
    node: machine
  - type: Wires
    BoardName: "DawInstrument"
    LayoutId: DawInstrument
  - type: Machine
    board: DawInstrumentMachineCircuitboard
  - type: Instrument
    allowPercussion: true
    allowProgramChange: true
