# Most of these have DO NOT MAP, since stations are completely unequipped to deal with ship combat + these are basically placeholder.

- type: entity
  id: ShuttleGunBase
  parent: BaseStructure
  name: shittle gun
  abstract: true
  components:
  - type: Appearance
  - type: InteractionOutline
  - type: Anchorable
  - type: Rotatable
  - type: ContainerContainer
  - type: Gun
    selectedMode: SemiAuto
    availableModes:
      - SemiAuto
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Electronic
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: BasicDevice
  - type: WirelessNetworkConnection
    range: 200
  - type: DeviceLinkSink
    ports:
    - Trigger
    - Toggle
    - On
    - Off
  - type: AutoShootGun
  - type: GunSignalControl
  - type: StaticPrice
    price: 1500

# ---- Laser weapon branch ----
# naming: LSE (Laser) + conventional power + suffix (c for PowerCage, e for wired energy) + Name
# example: LSE-100e "Clown destroyer" (powered by the wiring, very weak)

- type: entity
  id: ShuttleGunSvalinnMachineGun
  parent: [ ShuttleGunBase, ConstructibleMachine]
  name: LSE-400c "Svalinn machine gun"
  description: Basic stationary laser unit. Effective against live targets and electronics. Uses regular power cells to fire, and has an extremely high rate of fire.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/laser.rsi
    layers:
    - state: lse-400c
    - state: mag-unshaded-9
      map: ["enum.GunVisualLayers.MagUnshaded"]
      shader: unshaded
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      cell_slot: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 350 #Sunrise-edit
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    fireRate: 5
    useKey: false
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_svalinn.ogg
      params:
        variation: 0.05
  - type: MagazineVisuals
    magState: mag
    steps: 10
    zeroVisible: true
  - type: Machine
    board: ShuttleGunSvalinnMachineGunCircuitboard
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: Magazine
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        whitelist:
          tags:
            - PowerCell
  - type: BatteryAmmoProvider
    proto: RedShuttleMediumLaser #RedLightLaser
    fireCost: 20 # Sunrise-edit

- type: entity
  id: ShuttleGunPerforator
  parent: [ ShuttleGunBase, ConstructibleMachine]
  name: LSE-1200c "Perforator"
  description: Advanced stationary laser unit. Annihilates electronics and is extremely dangerous to health! Uses the power cage to fire.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/laser.rsi
    layers:
    - state: lse-1200c
    - state: mag-unshaded-9
      map: ["enum.GunVisualLayers.MagUnshaded"]
      shader: unshaded
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      cell_slot: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 500 # Sunrise-edit
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    fireRate: 1
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_perforator.ogg
      params:
        variation: 0.05
  - type: MagazineVisuals
    magState: mag
    steps: 10
    zeroVisible: true
  - type: Machine
    board: ShuttleGunPerforatorCircuitboard
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: Magazine
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        whitelist:
          tags:
            - PowerCage
  - type: BatteryAmmoProvider
    proto: RedShuttleLaser
    fireCost: 150

# ---- Launchers ----
# naming: EXP (Explosion) + conventional power + suffix (g for Grenade, c for RPG Cartridge) + Name
# example: EXP-100c "Poppy"

- type: entity
  id: ShuttleGunFriendship
  parent: [ShuttleGunBase, ConstructibleMachine]
  name: EXP-320g "Friendship"
  description: A small stationary grenade launcher that holds 2 grenades.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/launcher.rsi
    layers:
    - state: exp-320g
    - state: mag-7
      map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      ballistic-ammo: !type:Container
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    projectileSpeed: 80
    fireRate: 1
    angleDecay: 45
    minAngle: 0
    maxAngle: 15
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_friendship.ogg
      params:
        pitch: 0.8
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: BallisticAmmoProvider
    whitelist:
      tags:
        - ArtilleryShell #Sunrise-edit
    capacity: 2
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
  - type: Machine
    board: ShuttleGunFriendshipCircuitboard
  - type: MagazineVisuals
    magState: mag
    steps: 8
    zeroVisible: false

- type: entity
  id: ShuttleGunDuster
  parent: [ShuttleGunBase, ConstructibleMachine]
  name: EXP-2100g "Duster"
  description: A powerful stationary grenade launcher. A cartridge is required for use.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/launcher.rsi
    layers:
    - state: exp-2100g
    - state: mag-7
      map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      gun_magazine: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 350
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    projectileSpeed: 40
    fireRate: 0.3
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_duster.ogg
      params:
        variation: 0.05
        pitch: 0.8
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: Machine
    board: ShuttleGunDusterCircuitboard
  - type: MagazineAmmoProvider
  - type: MagazineVisuals
    magState: mag
    steps: 8
    zeroVisible: false
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        priority: 2
        whitelist:
          tags:
          - MagazineGrenade
        insertSound:
          path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
          params:
            pitch: 2
        ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg

# ---- Other weapon ----

- type: entity
  id: ShuttleGunPirateCannon
  parent: ShuttleGunBase
  name: pirate ship cannon
  description: Kaboom!
  components:
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/pirate_cannon.rsi
    layers:
    - state: base
  - type: Gun
    fireRate: 1
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/mateba.ogg
  - type: BallisticAmmoProvider
    whitelist:
      tags:
        - CannonBall
    capacity: 1
    proto: CannonBall
    soundInsert:
      path: /Audio/Weapons/Guns/Gunshots/grenade_launcher.ogg

- type: entity
  id: ShuttleGunKinetic
  parent: [ ShuttleGunBase, ConstructibleMachine]
  name: PTK-800 "Matter Dematerializer"
  description: Salvage stationary mining turret. Gradually accumulates charges on its own, extremely effective for asteroid excavation.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/kinetic.rsi
    layers:
    - state: ptk-800
    - state: mag-7
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    projectileSpeed: 20
    fireRate: 2
    selectedMode: SemiAuto
    angleDecay: 45
    minAngle: 5
    maxAngle: 15
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg
      params:
        variation: 0.12
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 2
    rechargeSound:
      path: /Audio/Weapons/Guns/Bolt/lmg_bolt_closed.ogg
      params:
        pitch: 1.2
        variation: 0.08
  - type: BasicEntityAmmoProvider
    proto: BulletKineticShuttle
    capacity: 5
    count: 5
  - type: Machine
    board: ShuttleGunKineticCircuitboard

- type: entity
  parent: ShuttleGunBase
  id: ShuttleGunKineticOld
  name: exomorphic dematerializer
  description: An ancient ship gun, utilizing biomechanical systems to store and release energy. While unique in its design, it has been rendered obsolete due to its inferior charging and firing speed compared to mechanical constructions.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shuttles/xeno.rsi
    layers:
    - state: rail
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Gun
    projectileSpeed: 20
    fireRate: 0.2
    selectedMode: SemiAuto
    angleDecay: 45
    minAngle: 5
    maxAngle: 15
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg
      params:
        variation: 0.12
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 35
    rechargeSound:
      path: /Audio/Weapons/Guns/Bolt/lmg_bolt_closed.ogg
      params:
        pitch: 1.2
        variation: 0.08
  - type: BasicEntityAmmoProvider
    proto: BulletKineticShuttle
    capacity: 3
    count: 3
  - type: DeviceLinkSink
    ports:
    - Trigger

# Sunrise-start
# region Auto-Links
- type: entity
  id: SignalButtonLongbow
  parent: SignalButton
  name: Longbow 127 Fire Button
  suffix: Autolink
  components:
    - type: AutoLinkTransmitter
      channel: Longbow

- type: entity
  id: SignalButtonVympel
  parent: SignalButton
  name: Vympel 127-2 Fire Button
  suffix: Autolink
  components:
    - type: AutoLinkTransmitter
      channel: Vympel

- type: entity
  id: SignalButtonQuadling
  parent: SignalButton
  name: Quadling 127-4 Fire Button
  suffix: Autolink
  components:
    - type: AutoLinkTransmitter
      channel: Quadling

- type: entity
  id: SignalButtonSquall
  parent: SignalButton
  name: Squall 308 Fire Button
  suffix: Autolink
  components:
    - type: AutoLinkTransmitter
      channel: Squall

# region ---- Autocannon ----
# naming: BAL (Ballistic) + calliber + Name
# example: BAL-152 "Molot"

- type: entity
  id: ShuttleGunLongbow
  parent: [ShuttleGunBase, ConstructibleMachine]
  name: BAL-127 "Longbow"
  description: A powerful stationary heavy autocanon. A cartridge is required for use.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/bal-127.rsi
    scale: 1.1, 1.1
    layers:
    - state: bal-127
    - state: mag-7
      map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      gun_magazine: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 800
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    minAngle: 1
    maxAngle: 3
    projectileSpeed: 50
    fireRate: 0.8
    soundGunshot:
      path: /Audio/_Sunrise/Weapons/Guns/Snipers/Bauer127/bauer127_shot.ogg
      params:
        pitch: 1.1
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: Machine
    board: ShuttleGunLongbowCircuitboard
  - type: MagazineAmmoProvider
  - type: MagazineVisuals
    magState: mag
    steps: 8
    zeroVisible: false
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        priority: 2
        whitelist:
          tags:
          - MagazineBauer127
        insertSound:
          path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
          params:
            pitch: 2
        ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg
  - type: AutoLinkReceiver
    channel: Longbow

- type: entity
  id: ShuttleGunVympel
  parent: [ShuttleGunBase, ConstructibleMachine]
  name: BAL-127-2 "Vympel"
  description: A powerful stationary twin heavy autocanon. A cartridge is required for use.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/bal-127-2.rsi
    scale: 1.05, 1.05
    layers:
    - state: bal-127-2
    - state: mag-14
      map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      gun_magazine: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 800
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    selectedMode: Burst
    availableModes:
    - Burst
    - FullAuto
    burstFireRate: 5
    shotsPerBurst: 6
    burstCooldown: 1
    minAngle: 3
    maxAngle: 20
    angleIncrease: 1
    angleDecay: 20
    projectileSpeed: 35
    fireRate: 2.5
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_friendship.ogg
      params:
        pitch: 1.2
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: Machine
    board: ShuttleGunVympelCircuitboard
  - type: BallisticAmmoProvider
    whitelist:
      tags:
        - CartridgeAntiMateriel
    capacity: 30
    proto: Null
    soundInsert:
      path: /Audio/Weapons/Guns/Bolt/lmg_bolt_closed.ogg
      params:
        pitch: 1.2
        variation: 0.08
  - type: MagazineVisuals
    magState: mag
    steps: 15
    zeroVisible: false
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.3,0.5,0.3"
        density: 125
        mask:
        - MachineMask
        layer:
        - MidImpassable
        - LowImpassable
  - type: AutoLinkReceiver
    channel: Vympel

- type: entity
  id: ShuttleGunQuadling
  parent: [ShuttleGunBase, ConstructibleMachine]
  name: BAL-127-4 "Quadling"
  description: THE POWER OF ELEVE... ahem, four barrels. Stationary quad heavy autocanon.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/bal-127-4.rsi
    scale: 1.05, 1.05
    layers:
    - state: bal-127
    - state: mag-13
      map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      gun_magazine: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 800
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    selectedMode: FullAuto
    availableModes:
    - Burst
    - FullAuto
    burstFireRate: 10
    shotsPerBurst: 8
    burstCooldown: 2
    minAngle: 4
    maxAngle: 25
    angleIncrease: 1
    angleDecay: 25
    projectileSpeed: 32
    fireRate: 4
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_duster.ogg
      params:
        pitch: 1.9
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: Machine
    board: ShuttleGunQuadlingCircuitboard
  - type: BallisticAmmoProvider
    whitelist:
      tags:
        - CartridgeAntiMateriel
    capacity: 90
    proto: null
    soundInsert:
      path: /Audio/Weapons/Guns/Bolt/lmg_bolt_closed.ogg
      params:
        pitch: 1.2
        variation: 0.08
  - type: MagazineVisuals
    magState: mag
    steps: 14
    zeroVisible: false
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.3,0.45,0.3"
        density: 200
        mask:
        - MachineMask
        layer:
        - MidImpassable
        - LowImpassable
  - type: AutoLinkReceiver
    channel: Quadling

- type: entity
  id: ShuttleGunSquall
  parent: [ShuttleGunBase, ConstructibleMachine]
  name: BAL-308 "Squall"
  description: A powerful stationary minigun. A cartridge is required for use.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/bal-308.rsi
    layers:
    - state: bal-308
    - state: mag-13
      map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      gun_magazine: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 500
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    selectedMode: FullAuto
    availableModes:
    - Burst
    - FullAuto
    projectileSpeed: 30
    fireRate: 12
    burstFireRate: 25
    shotsPerBurst: 20
    burstCooldown: 1.5
    minAngle: 6
    maxAngle: 50
    angleIncrease: 0.75
    angleDecay: 50
    soundGunshot:
      path: /Audio/_Sunrise/Weapons/Guns/HMGs/minigun_shot.ogg
      params:
        pitch: 0.8
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: Machine
    board: ShuttleGunSquallCircuitboard
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.3,-0.4,0.3,0.4"
        density: 100
        mask:
        - MachineMask
        layer:
        - MidImpassable
        - LowImpassable
  - type: MagazineAmmoProvider
  - type: MagazineVisuals
    magState: mag
    steps: 14
    zeroVisible: false
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        priority: 2
        whitelist:
          tags:
          - MagazineMachineGunHeavyRifle
        insertSound:
          path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
          params:
            pitch: 2
        ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg
  - type: AutoLinkReceiver
    channel: Squall

# region ---- Lasers ----
- type: entity
  id: ShuttleGunBeamstormMachineGun
  parent: [ ShuttleGunBase, ConstructibleMachine]
  name: LSE-800c "Beamstorm machine gun"
  description: Advance stationary laser unit. Effective against live targets and electronics. Uses the power cage to fire, and has an extremely high rate of fire.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/laser.rsi
    layers:
    - state: lse-800c
    - state: mag-unshaded-9
      map: ["enum.GunVisualLayers.MagUnshaded"]
      shader: unshaded
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      cell_slot: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    fireRate: 10
    useKey: false
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ship_svalinn.ogg
      params:
        variation: 0.05
  - type: MagazineVisuals
    magState: mag
    steps: 10
    zeroVisible: true
  - type: Machine
    board: ShuttleGunBeamstormMachineGunCircuitboard
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: Magazine
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        whitelist:
          tags:
            - PowerCage
  - type: BatteryAmmoProvider
    proto: RedShuttleMediumLaser
    fireCost: 30

# TSL Tesla
- type: entity
  id: ShuttleGunTeslaOrion
  parent: [ ShuttleGunBase, ConstructibleMachine]
  name: TSL-200c "Orion"
  description: Hi-tech stationary energy unit based on the principle of an experimental Tesla engine.. Effective against electronics. Uses the power cage to fire tesla or ion bolt.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/tesla.rsi
    layers:
    - state: tsl-200c
    - state: mag-unshaded-4
      map: ["enum.GunVisualLayers.MagUnshaded"]
      shader: unshaded
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      cell_slot: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    fireRate: 0.6
    projectileSpeed: 28
    useKey: false
    soundGunshot:
      path: /Audio/Effects/Lightning/lightningshock.ogg
      params:
        variation: 0.2
  - type: MagazineVisuals
    magState: mag
    steps: 5
    zeroVisible: true
  - type: Machine
    board: ShuttleGunTeslaOrionCircuitboard
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: Magazine
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        whitelist:
          tags:
            - PowerCage
  - type: BatteryAmmoProvider
    proto: TeslaGunBullet
    fireCost: 400
  - type: BatteryWeaponFireModes
    fireModes:
    - proto: TeslaGunBullet
      fireCost: 400
    - proto: BulletEMPMedium
      fireCost: 500
  - type: AmbientSound
    enabled: true
    sound:
      path: /Audio/Effects/tesla.ogg
    range: 5
    volume: -13

- type: entity
  id: ShuttleGunTeslaHyperion
  parent: [ ShuttleGunBase, ConstructibleMachine]
  name: TSL-300c "Hyperion"
  description: Hi-tech stationary energy unit based on the principle of an experimental Tesla engine.. Effective against electronics. Uses the power cage to fire tesla or ion bolt.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shuttles/tesla-2.rsi
    layers:
    - state: tsl-300c
    - state: mag-unshaded-4
      map: ["enum.GunVisualLayers.MagUnshaded"]
      shader: unshaded
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      cell_slot: !type:ContainerSlot
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors:
        - !type:ChangeConstructionNodeBehavior
          node: machineFrame
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: Gun
    fireRate: 0.4
    projectileSpeed: 27
    useKey: false
    soundGunshot:
      path: /Audio/Effects/Lightning/lightningshock.ogg
      params:
        variation: 0.2
  - type: MagazineVisuals
    magState: mag
    steps: 5
    zeroVisible: true
  - type: Machine
    board: ShuttleGunTeslaHyperionCircuitboard
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: Magazine
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        whitelist:
          tags:
            - PowerCage
  - type: BatteryAmmoProvider
    proto: TeslaGunBulletLarge
    fireCost: 900
  - type: BatteryWeaponFireModes
    fireModes:
    - proto: TeslaGunBulletLarge
      fireCost: 900
    - proto: BulletEMPLarge
      fireCost: 1000
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.9,0.45,0.9"
        density: 200
        mask:
        - MachineMask
        layer:
        - MidImpassable
        - LowImpassable
  - type: AmbientSound
    enabled: true
    sound:
      path: /Audio/Effects/tesla.ogg
    range: 5
    volume: -8
# Sunrise-end
