- type: entity
  name: BaseWeaponRifle
  parent: [BaseItem, BaseGunWieldable]
  id: BaseWeaponRifle
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: Sprite
  - type: Item
    size: Huge
    shape:
    - 0,0,3,2
  - type: Clothing
    sprite: Objects/Weapons/Guns/Rifles/ak.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: Gun
    fireRate: 5
    selectedMode: FullAuto
    availableModes:
      - FullAuto
      - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/batrifle.ogg
  - type: ChamberMagazineAmmoProvider
    soundRack:
      path: /Audio/Weapons/Guns/Cock/sf_rifle_cock.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineLightRifle
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazineLightRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeLightRifle
        priority: 1
        whitelist:
          tags:
            - CartridgeLightRifle
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: StaticPrice
    price: 500

- type: entity
  name: AKMS
  parent: [BaseWeaponRifle, BaseSecurityContraband]
  id: WeaponRifleAk
  description: A somewhat battered combat rifle of a design originating from old Earth. Favored by criminals, militias, and terrorists due to its famed reliability and easy-to-manufacture design. Feeds from .30 rifle magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Rifles/ak.rsi
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
  - type: Gun
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/rifle2.ogg
  - type: ChamberMagazineAmmoProvider
    soundRack:
      path: /Audio/Weapons/Guns/Cock/ltrifle_cock.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineLightRifle
        insertSound: /Audio/Weapons/Guns/MagIn/ltrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/ltrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazineLightRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeLightRifle
        priority: 1
        whitelist:
          tags:
            - CartridgeLightRifle
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance

- type: entity
  name: M90 GL
  parent: [BaseWeaponRifle, BaseSyndicateContraband]
  id: WeaponRifleM90GrenadeLauncher
  description: "An older bullpup carbine model, with an attached underbarrel grenade launcher.\nFeeds from .20 rifle magazines."
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Rifles/carbine.rsi
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Rifles/carbine.rsi
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineRifle
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazineRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeRifle
        priority: 1
        whitelist:
          tags:
            - CartridgeRifle
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance

- type: entity
  name: Lecter
  parent: [BaseWeaponRifle, BaseSecurityContraband]
  id: WeaponRifleLecter
  description: "Popular gas-operated combat rifle used heavily by Nanotrasen and SolGov. Operating in semi or fully automatic, its accuracy, stopping power, and reliability make it excel in all manner of environments.\nFeeds from .20 rifle magazines."
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Rifles/lecter.rsi
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: Objects/Weapons/Guns/Rifles/lecter.rsi
  - type: Gun
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/ltrifle.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineRifle
        insertSound: /Audio/Weapons/Guns/MagIn/ltrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/ltrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazineRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeRifle
        priority: 1
        whitelist:
          tags:
            - CartridgeRifle
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: MagazineVisuals
    magState: mag
    steps: 5
    zeroVisible: true
  - type: Appearance

- type: entity
  parent: WeaponRifleLecter
  id: WeaponRifleLecterXL8
  name: XL8
  description: |-
    The Experimental Lecter 8
    An unreasonably expensive military grade assault rifle with integrated optic. 
    Uses .20 rifle ammo.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Rifles/XL8.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Rifles/XL8.rsi
  - type: CursorOffsetRequiresWield
  - type: EyeCursorOffset
    maxOffset: 2
    pvsIncrease: 0.2
  - type: StaticPrice
    price: 1500 #3x lecter
  - type: Gun
    shotsPerBurst: 3
    selectedMode: Burst
    availableModes:
    - Burst
    - SemiAuto
    - FullAuto
  
- type: entity
  name: Estoc DMR
  parent: [BaseWeaponRifle, BaseSyndicateContraband]
  id: WeaponRifleEstoc
  description: "A designated marksman rifle firing in 3-round bursts. The Estoc was designed as the Lecter’s long-range counterpart, equipped with an extended 20-inch barrel and telescopic sight.\nFeeds from .20 rifle magazines."
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Rifles/estoc.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Item
    shape:
    - 0,0,4,2
  - type: Clothing
    sprite: Objects/Weapons/Guns/Rifles/estoc.rsi
  - type: Gun
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/estocshot.ogg
    minAngle: 30
    maxAngle: 43
    shotsPerBurst: 3
    selectedMode: Burst
    availableModes:
    - Burst
    - SemiAuto
    burstFireRate: 14
  - type: GunWieldBonus
    minAngle: -28
    maxAngle: -25
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineRifle
        insertSound: /Audio/Weapons/Guns/MagIn/ltrifle_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/ltrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
          - MagazineRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeRifle
        priority: 1
        whitelist:
          tags:
          - CartridgeRifle
  - type: SpeedModifiedOnWield
    walkModifier: 0.75
    sprintModifier: 0.75
  - type: CursorOffsetRequiresWield
  - type: EyeCursorOffset
    maxOffset: 2
    pvsIncrease: 0.2
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance

- type: entity
  name: Foam Force Astro Ace
  parent: [BaseWeaponShotgun, BaseGunWieldable]
  id: WeaponRifleFoam
  description: A premium foam rifle of the highest quality. Its plastic feels rugged, and its mechanisms sturdy.
  components:
  - type: Sprite
    sprite: Objects/Fun/Foam/foam_rifle.rsi
  - type: Clothing
    sprite: Objects/Fun/Foam/foam_rifle.rsi
  - type: Item
    sprite: Objects/Fun/Foam/foam_rifle_inhand_64x.rsi
    shape:
    - 0,0,3,0
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - BulletFoam
    capacity: 10
    proto: BulletFoam
  - type: GunRequiresWield #remove when inaccuracy on spreads is fixed
  - type: Gun
    fireRate: 2
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Effects/thunk.ogg
    soundEmpty:
      path: /Audio/Weapons/Guns/Empty/empty.ogg
    clumsyProof: true
  - type: PacifismAllowedGun
