# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 ElectroJr <leonsfriedrich@gmail.com>
# SPDX-FileCopyrightText: 2022 Fishfish458 <47410468+Fishfish458@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <le0nel_1van@hotmail.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 rolfero <45628623+rolfero@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Arendian <137322659+Arendian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 GitHubUser53123 <110841413+GitHubUser53123@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hmeister <nathan.springfredfoxbon4@gmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lanse12 <cloudability.ez@gmail.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 superjj18 <gagnonjake@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: improvised pneumatic cannon
  parent: [BaseStorageItem, BaseMinorContraband]
  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
  - type: PacifismAllowedGun


- type: entity
  name: pie cannon
  parent: BaseStorageItem
  id: LauncherCreamPie
  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: Normal
  - type: Clothing
    sprite: Objects/Weapons/Guns/Cannons/pie_cannon.rsi
    quickEquip: false
    slots:
    - Back
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []
  - type: PacifismAllowedGun


#- type: entity # Goobstation - proper syringe guns
#  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: Normal
#  - type: ContainerContainer
#    containers:
#      storagebase: !type:Container
#        ents: []
#  - type: PacifismAllowedGun


# 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