- type: entity
  name: improvised pneumatic cannon
  parent: [BaseStorageItem, BaseMinorContraband, BaseExaminableClothing] # starcup: examinable clothing
  id: WeaponImprovisedPneumaticCannon
  description: Improvised using nothing but a pipe, some zipties, and a pneumatic cannon. Doesn't accept tanks without enough gas.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Cannons/pneumatic_cannon.rsi
    layers:
    - state: icon
    - state: tank
      map: [ "tank" ]
      visible: false
  - type: Item
    size: Huge
  - type: Clothing
    quickEquip: false
    slots:
    - Back
  - type: Gun
    fireRate: 2
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Effects/thunk.ogg
    soundEmpty:
      path: /Audio/Items/hiss.ogg
    clumsyProof: true
  - type: ContainerAmmoProvider
    container: storagebase
  - type: PneumaticCannon
  - type: Storage
    maxItemSize: Normal
    grid:
    - 0,0,1,1
  - type: Appearance
  - type: ItemMapper
    containerWhitelist: [gas_tank]
    mapLayers:
      tank:
        whitelist:
          components:
          - GasTank
  - type: Construction
    graph: PneumaticCannon
    node: cannon
  - type: ItemSlots
    slots:
      gas_tank:
        name: pneumatic-cannon-component-itemslot-name
        whitelist:
          components:
          - GasTank
        insertSound:
          path: /Audio/Weapons/click.ogg
          params:
            volume: -3
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []
      gas_tank: !type:ContainerSlot
  # begin starcup: examinable clothing
  - type: ExaminableClothing
    examineText: clothing-pneumatic-cannon
  # end starcup

- type: entity
  parent: BaseStorageItem
  id: LauncherCreamPie
  name: pie cannon
  suffix: Empty
  description: Load cream pie for optimal results.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Cannons/pie_cannon.rsi
    layers:
    - state: piecannon
  - type: Storage
    maxItemSize: Normal
    grid:
    - 0,0,7,3
    whitelist:
      components:
      - CreamPie
  - type: Gun
    fireRate: 1
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    - FullAuto
    soundGunshot:
      path: /Audio/Effects/thunk.ogg
    soundEmpty:
      path: /Audio/Items/hiss.ogg
    clumsyProof: true
  - type: ContainerAmmoProvider
    container: storagebase
  - type: Item
    size: Large
  - type: Clothing
    sprite: Objects/Weapons/Guns/Cannons/pie_cannon.rsi
    quickEquip: false
    slots:
    - Back
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []

- type: entity
  name: experimental pie cannon
  parent: BaseWeaponBattery
  id: BorgLauncherCreamPie
  description: Deliver a generous portion of cream directly to the crew! Automatically bakes pies over time.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Cannons/pie_cannon.rsi
    layers:
    - state: piecannon
  - type: Gun
    fireRate: 2
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    - FullAuto
    soundGunshot:
      path: /Audio/Effects/thunk.ogg
    soundEmpty:
      path: /Audio/Items/hiss.ogg
    clumsyProof: true
  - type: BatteryAmmoProvider
    proto: FoodPieBananaCream
    fireCost: 30
  - type: Battery
    maxCharge: 90
    startingCharge: 90
  - type: BatterySelfRecharger
    autoRechargeRate: 1
  - type: AmmoCounter
  - type: Item
    size: Normal

- type: entity
  name: syringe gun
  parent: BaseStorageItem
  id: LauncherSyringe
  description: Load full of poisoned syringes for optimal fun.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Cannons/syringe_gun.rsi
    layers:
    - state: syringe_gun
  - type: Storage
    maxItemSize: Normal
    grid:
    - 0,0,2,0
    whitelist:
      tags:
      - SyringeGunAmmo
  - type: Gun
    fireRate: 1
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/syringe_gun.ogg
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
    clumsyProof: true
  - type: ContainerAmmoProvider
    container: storagebase
  - type: Item
    size: Large
    shape:
    - 0,0,2,1
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []

# shoots bullets instead of throwing them, no other changes
- type: entity
  parent: WeaponImprovisedPneumaticCannon
  id: WeaponImprovisedPneumaticCannonGun
  suffix: Gun
  components:
  - type: PneumaticCannon
    throwItems: false

# doesn't need gas, extra capacity
- type: entity
  parent: WeaponImprovisedPneumaticCannonGun
  id: WeaponImprovisedPneumaticCannonAdmeme
  suffix: Admeme
  components:
  - type: Item
    size: Ginormous
  - type: Storage
    maxItemSize: Ginormous
    grid:
    - 0,0,19,10
    whitelist:
      tags: [] #dodging a test fail like the IRS
  - type: PneumaticCannon
    gasUsage: 0
    throwItems: false
  - type: Gun
    fireRate: 10
    selectedMode: FullAuto
    availableModes:
    - SemiAuto
    - FullAuto
    soundGunshot:
      path: /Audio/Effects/thunk.ogg
    soundEmpty:
      path: /Audio/Items/hiss.ogg
