- type: entity
  abstract: true
  parent: [ BaseItem, BaseGunWieldable ]
  id: BaseWeaponLauncher
  name: BaseWeaponLauncher
  description: A rooty tooty point and shooty.
  components:
  - type: Sprite
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
        ents: []
  - type: Clothing
    sprite: Objects/Weapons/Guns/Launchers/china_lake.rsi
    quickEquip: false
    slots:
    - Back
  - type: Item
    size: Ginormous
    shape:
      - 0,0,6,3
  - type: StaticPrice
    price: 500
  - type: Gun
    fireRate: 1
    projectileSpeed: 25 # Slower than a bullet, same speed as our old projectile limit.
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/grenade_launcher.ogg

- type: entity
  parent: [ BaseWeaponLauncher, BaseSyndicateContraband ]
  id: WeaponLauncherChinaLake
  name: china lake
  description: PLOOP.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/china_lake.rsi
    layers:
    - state: icon
      map: [ "enum.GunVisualLayers.Base" ]
  - type: Item
    size: Huge
    shape:
    - 0,0,4,2
  - type: Clothing
    sprite: Objects/Weapons/Guns/Launchers/china_lake.rsi
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - Grenade
    capacity: 3
    proto: GrenadeFrag
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
  - type: GunRequiresWield
  - type: StaticPrice
    price: 10000

- type: entity
  parent: [ BaseWeaponLauncher, BaseMajorContraband ]
  id: WeaponLauncherHydra
  name: hydra
  description: PLOOP... FSSSSSS...
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/hydra_launcher.rsi
    layers:
    - state: icon
      map: [ "enum.GunVisualLayers.Base" ]
  - type: Item
    size: Huge
  - type: ContainerContainer
    containers:
      revolver-ammo: !type:Container
  - type: Clothing
    sprite: Objects/Weapons/Guns/Launchers/hydra_launcher.rsi
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: GunRequiresWield
  - type: RevolverAmmoProvider
    whitelist:
      tags:
      - Grenade
    proto: GrenadeCleanade
    capacity: 6
    chambers: [ True, True, True, True, True, True ]
    ammoSlots: [ null, null, null, null, null, null ]
    soundEject:
      path: /Audio/Weapons/Guns/MagOut/sfrifle_magout.ogg
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/sfrifle_magin.ogg

- type: entity
  parent: WeaponLauncherHydra
  id: WeaponLauncherHydraLethal
  suffix: frag
  components:
  - type: RevolverAmmoProvider
    proto: GrenadeFrag

- type: entity
  parent: [ BaseWeaponLauncher, BaseMajorContraband ]
  id: WeaponLauncherRocket
  name: RPG-7
  description: A modified ancient rocket-propelled grenade launcher.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/rocket.rsi
    layers:
    - state: base
      map: [ "enum.GunVisualLayers.Base" ]
    - state: mag-0
      map: [ "enum.GunVisualLayers.Mag" ]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Launchers/rocket.rsi
  - type: Gun
    fireRate: 0.5
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/rpgfire.ogg
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - CartridgeRocket
    proto: CartridgeRocket
    capacity: 1
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
  - type: MagazineVisuals
    magState: mag
    steps: 2
    zeroVisible: false
  - type: Appearance

- type: entity
  parent: [ BaseItem, BaseXenoborgContraband ]
  id: WeaponGuidedMissileLauncherXenoborg
  name: XB GML-78 # Xenoborg Guided Missile Launcher 78
  description: A guided missile launcher.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/xenoborg_guided_missile_launcher.rsi
    layers:
    - state: base
      map: [ "enum.GunVisualLayers.Base" ]
    - state: mag-3
      map: [ "enum.GunVisualLayers.Mag" ]
  - type: Appearance
  - type: MagazineVisuals
    magState: mag
    steps: 4
    zeroVisible: false
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
        ents: []
  - type: Gun
    fireRate: 2
    projectileSpeed: 6 # needs to be the same as the speed of the chasing walk component of the projectile
    # otherwise the missile will be faster if shot without a target
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/rpgfire.ogg
  - type: BallisticAmmoProvider
    proto: BulletGuidedXenoborgMissile
    capacity: 3
    cycleable: false
  - type: BallisticAmmoSelfRefiller
    autoRefillRate: 17s # takes a while to get a new one
  - type: TargetAssign
  - type: DeviceLinkSink
    ports:
    - TargetReceiver
  - type: AutoLinkReceiver
    channel: XenoborgGuidedMissileLauncher

- type: entity
  parent: BaseWeaponLauncher
  id: WeaponLauncherMultipleRocket
  name: multiple rocket launcher
  description: A modified ancient rocket-propelled grenade launcher.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/rocket.rsi
    layers:
    - state: base
      map: [ "enum.GunVisualLayers.Base" ]
    - state: mag-0
      map: [ "enum.GunVisualLayers.Mag" ]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Launchers/rocket.rsi
  - type: Gun
    fireRate: 6
    selectedMode: FullAuto
    availableModes:
    - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/rpgfire.ogg
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - CartridgeRocket
    proto: CartridgeRocketSlow
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
  - type: MagazineVisuals
    magState: mag
    steps: 2
    zeroVisible: true
  - type: Appearance

- type: entity
  parent: [ BaseItem, BaseXenoborgContraband ]
  id: WeaponRocketLauncherXenoborg
  name: XB MRL-97-D # Xenoborg Multi Rocket Launcher 97 D (Demolition)
  description: A alien rocket launcher fitted with special demolition rockets.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/xb_mlr.rsi
    layers:
    - state: mlr
      map: [ "enum.GunVisualLayers.Base" ]
    - state: mag-6
      map: [ "enum.GunVisualLayers.Mag" ]
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
        ents: []
  - type: Gun
    burstFireRate: 12.5
    selectedMode: Burst
    availableModes:
    - Burst
    shotsPerBurst: 6
    minAngle: 10
    angleIncrease: 10
    maxAngle: 60
    projectileSpeed: 12.5
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/rocket1.ogg
  - type: BallisticAmmoProvider
    capacity: 6
    proto: BulletXenoborgMechadermisRocket
    cycleable: false
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
  - type: BallisticAmmoSelfRefiller
    autoRefillRate: 12s
  - type: MagazineVisuals
    magState: mag
    steps: 7
    zeroVisible: false
  - type: Appearance

- type: entity
  parent: BaseWeaponLauncher
  id: WeaponLauncherPirateCannon
  name: pirate cannon
  description: Kaboom!
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/pirate_cannon.rsi
    layers:
    - state: icon
      map: [ "enum.GunVisualLayers.Base" ]
  - type: ContainerContainer
    containers:
      balistic-ammo: !type:Container
        ents: []
      ballistic-ammo: !type:Container
        ents: []
  - type: Clothing
    sprite: Objects/Weapons/Guns/Launchers/pirate_cannon.rsi
  - 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
  parent: BaseItem
  id: WeaponGrapplingGun
  name: grappling gun
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/grappling_gun.rsi
    layers:
    - state: base
    - state: base-unshaded
      map: [ "unshaded" ]
      visible: true
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    - 0,1,0,1
    storedOffset: 0,-6
  - type: AmmoCounter
  - type: GrapplingGun
  - type: Gun
    soundGunshot: /Audio/Weapons/Guns/Gunshots/harpoon.ogg
    fireRate: 1
    clumsyProof: true
  - type: BasicEntityAmmoProvider
    proto: GrapplingHook
    capacity: 1
  - type: UseDelay
    delay: 0.5
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.TetherVisualsStatus.Key:
        unshaded:
          True: { state: base-unshaded }
          False: { state: base-unshaded-off }
  - type: PacifismAllowedGun

# Admeme
- type: entity
  parent: WeaponLauncherMultipleRocket
  id: WeaponLauncherAdmemeMeteorLarge
  name: meteor launcher
  suffix: Admeme
  description: It fires large meteors.
  components:
  - type: BallisticAmmoProvider
    proto: MeteorMedium

- type: entity
  parent: WeaponLauncherAdmemeMeteorLarge
  id: WeaponLauncherAdmemeImmovableRodSlow
  name: immovable rod launcher
  suffix: Admeme
  description: It fires slow immovable rods.
  components:
  - type: BallisticAmmoProvider
    proto: ImmovableRodSlow
