- type: entity
  name: BaseWeaponShotgun
  parent: BaseItem
  id: BaseWeaponShotgun
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: Sprite
    layers:
    - state: icon
      map: [ "enum.GunVisualLayers.Base" ]
  - type: Item
    size: Large
    shape:
    - 0,0,4,0
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/db_shotgun.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: Gun
    fireRate: 2
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/shotgun.ogg
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - ShellShotgun
    capacity: 7
    proto: ShellShotgun
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/shotgun_insert.ogg
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
        ents: []
  - type: StaticPrice
    price: 500

- type: entity
  name: Bulldog
  # Don't parent to BaseWeaponShotgun because it differs significantly
  parent: [BaseItem, BaseGunWieldable, BaseSyndicateContraband]
  id: WeaponShotgunBulldog
  description: An automatic magazine-fed shotgun for close-quarters combat. Kicks like a mule on steroids. Uses .50 shotgun shells.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/bulldog.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Item
    size: Large
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/bulldog.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed
  - type: Gun
    fireRate: 2
    selectedMode: FullAuto
    availableModes:
    - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/shotgun.ogg
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineShotgun
        priority: 2
        whitelist:
          tags:
          - MagazineShotgun
        whitelistFailPopup: gun-magazine-whitelist-fail
        insertSound: /Audio/Weapons/Guns/MagIn/smg_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: MagazineAmmoProvider
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance
  - type: StaticPrice
    price: 5000

- type: entity
  name: double-barreled shotgun
  parent: [BaseWeaponShotgun, BaseGunWieldable, BaseSecurityBartenderContraband]
  id: WeaponShotgunDoubleBarreled
  description: An immortal classic. Uses .50 shotgun shells.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/db_shotgun.rsi
  - type: Item
    sprite: Objects/Weapons/Guns/Shotguns/db_shotgun_inhands_64x.rsi
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed
  - type: Gun
    fireRate: 3
  - type: GunSpreadModifier
    spread: 0.6
  - type: BallisticAmmoProvider
    capacity: 2
  - type: Construction
    graph: ShotgunSawn
    node: start
    deconstructionTarget: null

- type: entity
  name: double-barreled shotgun
  parent: WeaponShotgunDoubleBarreled
  id: WeaponShotgunDoubleBarreledRubber
  description: An immortal classic. Uses .50 shotgun shells.
  suffix: Non-Lethal
  components:
  - type: BallisticAmmoProvider
    proto: ShellShotgunBeanbag

- type: entity
  name: Enforcer
  parent: [BaseWeaponShotgun, BaseGunWieldable, BaseSecurityContraband]
  id: WeaponShotgunEnforcer
  description: A premium semi-automatic shotgun, and the pride of all security forces. Uses .50 shotgun shells.
  components: # intend for Enforcer to have wider choke for semi-auto function
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/enforcer.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/enforcer.rsi
  - type: Item
    sprite: Objects/Weapons/Guns/Shotguns/enforcer_inhands_64x.rsi
  - type: BallisticAmmoProvider
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed

- type: entity
  parent: WeaponShotgunEnforcer
  id: WeaponShotgunEnforcerRubber
  suffix: Non-Lethal
  components:
  - type: BallisticAmmoProvider
    proto: ShellShotgunBeanbag

- type: entity
  name: Kammerer
  parent: [BaseWeaponShotgun, BaseGunWieldable, BaseSecurityContraband]
  id: WeaponShotgunKammerer
  description: An old yet faithful design, and a favorite among irregular forces of many worlds. Uses .50 shotgun shells.
  components: # intend for Kammerer to have tighter choke for slower fire rate and/or manual cycling
  - type: Item
    sprite: Objects/Weapons/Guns/Shotguns/pump_inhands_64x.rsi
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/pump.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/pump.rsi
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed
  - type: Gun
    fireRate: 1
  - type: GunSpreadModifier
    spread: 0.6
  - type: Tag
    tags:
    - WeaponShotgunKammerer

- type: entity
  name: sawn-off shotgun
  parent: [ BaseWeaponShotgun, BaseSecurityBartenderContraband ]
  id: WeaponShotgunSawn
  description: Groovy! Uses .50 shotgun shells.
  components: # needs to be super inaccurate because you don't need to wield it
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/sawn.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/sawn.rsi
  - type: Item
    size: Small
    shape:
    - 0,0,2,0
    sprite: Objects/Weapons/Guns/Shotguns/sawn_inhands_64x.rsi
  - type: Gun
    fireRate: 3
  - type: GunSpreadModifier
    spread: 1.4
  - type: BallisticAmmoProvider
    capacity: 2
  - type: Construction
    graph: ShotgunSawn
    node: shotgunsawn
    deconstructionTarget: null

- type: entity
  name: sawn-off shotgun
  parent: WeaponShotgunSawn
  id: WeaponShotgunSawnEmpty
  description: Groovy! Uses .50 shotgun shells.
  suffix: Empty
  components:
  - type: BallisticAmmoProvider
    proto: null
  - type: Construction
    graph: ShotgunSawn
    node: shotgunsawn
    deconstructionTarget: null

- type: entity
  name: handmade pistol
  parent: [BaseWeaponShotgun, BaseMinorContraband]
  id: WeaponShotgunHandmade
  description: Looks unreliable. Uses .50 shotgun shells.
  components:
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    - 0,1,0,1
    storedOffset: 0,-5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/hm_pistol.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/hm_pistol.rsi
  - type: Gun
    fireRate: 4
  - type: BallisticAmmoProvider
    capacity: 1
  - type: Construction
    graph: ShotgunSawn
    node: shotgunsawn
    deconstructionTarget: null
  - type: StaticPrice
    price: 0

- type: entity
  name: blunderbuss
  parent: [BaseWeaponShotgun, BaseGunWieldable, BaseMinorContraband]
  id: WeaponShotgunBlunderbuss
  suffix: Pirate
  description: Deadly at close range.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/blunderbuss.rsi
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed
  - type: Gun
    fireRate: 2
  - type: BallisticAmmoProvider
    capacity: 1
  - type: StaticPrice
    price: 0

- type: entity
  name: improvised shotgun
  parent: [BaseWeaponShotgun, BaseGunWieldable, BaseMinorContraband]
  id: WeaponShotgunImprovised
  description: A shitty, hand-made shotgun that uses .50 shotgun shells. It can only hold one round in the chamber.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/improvised_shotgun.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/improvised_shotgun.rsi
  - type: Item
    sprite: Objects/Weapons/Guns/Shotguns/improvised_shotgun_inhands_64x.rsi
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed
  - type: Gun
    fireRate: 4 #No reason to stifle the firerate since you have to manually reload every time anyways.
  - type: BallisticAmmoProvider
    capacity: 1
    proto: null
  - type: Construction
    graph: ImprovisedShotgunGraph
    node: shotgun
  - type: StaticPrice
    price: 20

- type: entity
  name: improvised shotgun
  parent: WeaponShotgunImprovised
  suffix: Loaded
  id: WeaponShotgunImprovisedLoaded
  components:
  - type: BallisticAmmoProvider
    proto: ShellShotgunImprovised

- type: entity
  parent: [BaseWeaponShotgun, BaseGunWieldable, BaseSyndicateContraband]
  id: WeaponShotgunHushpup
  name: Hushpup
  description: An obscure modification of the Enforcer, fitted with an experimental muffler. Great for those with a strict moral code. Uses .50 shotgun shells.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Shotguns/hushpup.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Shotguns/hushpup.rsi
  - type: Item
    sprite: Objects/Weapons/Guns/Shotguns/hushpup.rsi
    shape:
    - 0,0,3,0 # smaller than BaseShotgun by 1 tile
  - type: BallisticAmmoProvider
    capacity: 4
  - type: GunRequiresWield
  - type: Gun
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/hushpup.ogg
      params:
        volume: -3
        rolloffFactor: 1.3
    fireRate: 2
  - type: GunSpreadModifier
    spread: 1.2
