- type: entity
  id: MassDriver
  name: mass driver
  description: The finest in spring-loaded piston toy technology, now on a space station near you.
  placement:
    mode: SnapgridCenter
  components:
  - type: ApcPowerReceiver
    load: 100
  - type: ExtensionCableReceiver
  - type: InteractionOutline
  - type: Clickable
  - type: Anchorable
  - type: Pullable
  - type: Transform
    anchored: true
  - type: Appearance
  - type: MassDriver
  - type: ActiveMassDriver
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.3,-0.16,0.3,0.16"
        density: 100
        layer:
        - ConveyorMask
        hard: false
      fix2:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.25,0.25,0.25"
        density: 100
        mask:
        - Impassable
        layer:
        - BulletImpassable
  - type: Sprite
    sprite: _Starlight/Structures/Machines/mass_driver.rsi
    noRot: true
    layers:
      - state: base
        map: [ "mainLayer" ]
      - state: panel_open
        map: ["enum.WiresVisualLayers.MaintenancePanel"]
  - type: GenericVisualizer
    visuals:
      enum.MassDriverVisuals.Launching:
        mainLayer:
          True: { state: launching }
          False: { state: base }
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: BasicDevice
  - type: DeviceList
  - type: DeviceLinkSink
    ports:
      - MassDriverConsoleReceiver
      - Launch
  - type: WiresPanel
  - type: WiresVisuals
  - type: Wires
    layoutId: MassDriver
  - type: UserInterface
    interfaces:
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: AmbientSound
    range: 10
    enabled: False
    volume: 0
    sound:
      path: /Audio/_Starlight/Effects/mass_driver_launching.ogg
  - type: Rotatable
  - type: Destructible
    thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 600
        behaviors:
          - !type:DoActsBehavior
            acts: [ "Destruction" ]
      - trigger:
          !type:DamageTrigger
          damage: 300
        behaviors:
          - !type:DoActsBehavior
            acts: ["Destruction"]
          - !type:PlaySoundBehavior
            sound:
              collection: MetalGlassBreak
          - !type:SpawnEntitiesBehavior
            spawn:
              SheetSteel1:
                min: 1
                max: 2
  - type: Construction
    graph: Machine
    node: machine
    containers:
      - machine_board
      - machine_parts
  - type: Machine
    board: MassDriverCircuitboard
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
