- type: entity
  name: BasePistol
  parent: BaseItem
  id: BaseWeaponPistol
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: Sprite
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    - 0,1,0,1
    storedOffset: 0,-4
  - type: Tag
    tags:
    - Sidearm
  - type: Clothing
    sprite: Objects/Weapons/Guns/Pistols/viper.rsi
    quickEquip: false
    slots:
    - suitStorage
    - Belt
  - type: Gun
    fireRate: 6
    selectedMode: SemiAuto
    availableModes:
      - SemiAuto
      - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/pistol.ogg
  - type: ChamberMagazineAmmoProvider
    soundRack:
      path: /Audio/Weapons/Guns/Cock/pistol_cock.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazinePistol
        insertSound: /Audio/Weapons/Guns/MagIn/pistol_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazinePistol
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgePistol
        priority: 1
        whitelist:
          tags:
            - CartridgePistol
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: AmmoCounter
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance
  - type: StaticPrice
    price: 500

- type: entity
  name: viper
  parent: [BaseWeaponPistol, BaseSyndicateContraband]
  id: WeaponPistolViper
  description: A common handgun illegally modified by the Syndicate. The Viper sports a selector switch between semi-auto and ‘rock and roll’. The standard sidearm for any soldier who fights under the three serpents. Feeds from .35 pistol magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Pistols/viper.rsi
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazinePistol
        insertSound: /Audio/Weapons/Guns/MagIn/pistol_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazinePistol
            - MagazinePistolHighCapacity
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgePistol
        priority: 1
        whitelist:
          tags:
            - CartridgePistol
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: StaticPrice
    price: 1000

- type: entity
  name: echis
  parent: [ BaseItem, BaseSyndicateContraband ]
  id: WeaponPistolEchis
  description: A cyborg-mounted weapon system based on the Viper pistol. Creates ammunition on the fly from an internal fabricator, which slowly self-charges.
  components:
  - type: Gun
    fireRate: 5
    selectedMode: SemiAuto
    availableModes:
      - SemiAuto
      - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/pistol.ogg
  - type: Sprite
    sprite: Objects/Weapons/Guns/Pistols/viper.rsi
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: ProjectileBatteryAmmoProvider
    proto: BulletPistol
    fireCost: 100
  - type: Battery
    maxCharge: 1000
    startingCharge: 1000
  - type: BatterySelfRecharger
    autoRecharge: true
    autoRechargeRate: 25
  - type: AmmoCounter

- type: entity
  name: cobra
  parent: [ BaseWeaponPistol, BaseSyndicateContraband ]
  id: WeaponPistolCobra
  description: Integrally suppressed semi-automatic pistol used by the Syndicate, firing caseless subsonic rounds. Favored by any agent who likes to keep things quiet and leave no evidence behind. Feeds from .25 pistol magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Pistols/cobra.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Pistols/cobra.rsi
  - type: ChamberMagazineAmmoProvider
    boltClosed: null
  - type: Gun
    fireRate: 4
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/silenced.ogg
      params:
        volume: -14
    availableModes:
    - SemiAuto
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazinePistolCaselessRifle
        insertSound: /Audio/Weapons/Guns/MagIn/pistol_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazinePistolCaselessRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeCaselessRifle
        priority: 1
        whitelist:
          tags:
            - CartridgeCaselessRifle
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: StaticPrice
    price: 1500

- type: entity
  name: mk 58
  parent: [BaseWeaponPistol, BaseSecurityContraband]
  id: WeaponPistolMk58
  description: Designed by Nanotrasen’s Small Arms Division, the Mk58 is a conventional semi-automatic pistol with a simple recoil-operated action and excellent reliability. The standard sidearm of Nanotrasen’s station security and emergency response teams. Feeds from .35 pistol magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Pistols/mk58.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Pistols/mk58.rsi
  - type: Item
    storedOffset: 0,-2
  - type: Gun
    fireRate: 5
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/mk58.ogg
  - type: StealTarget
    stealGroup: OfficerHandgun

- type: entity
  name: N1984
  parent: [BaseWeaponPistol, BaseSecurityContraband]
  id: WeaponPistolN1984
  description: An exceptionally powerful ‘hand cannon’ designed as part of Nanotrasen's BFG initiative. Chambered in .45, the lord’s caliber, it is generally considered too unwieldy for standard use but has become something of a status symbol among Nanotrasen officials. Feeds from .45 pistol magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Pistols/N1984.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Pistols/N1984.rsi
  - type: Gun
    minAngle: 1
    maxAngle: 20
    angleIncrease: 8
    angleDecay: 9
    fireRate: 4
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/mk58.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineMagnum
        insertSound: /Audio/Weapons/Guns/MagIn/pistol_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazineMagnum
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeMagnum
        priority: 1
        whitelist:
          tags:
            - CartridgeMagnum
