- 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
        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, BaseExaminableClothing] # starcup: examinable clothing
  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
        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
  # begin starcup: examinable clothing
  - type: ExaminableClothing
    examineText: clothing-akms
  # end starcup

- 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
        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, BaseExaminableClothing] # starcup: examinable clothing
  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
        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
        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
  # begin starcup: examinable clothing
  - type: ExaminableClothing
    examineText: clothing-lecter
  # end starcup
