# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 MortalBaguette <169563638+MortalBaguette@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 PunishedJoe <PunishedJoeseph@proton.me>
# SPDX-FileCopyrightText: 2025 Solstice <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: Chester
  parent: [ BaseWeaponRifle, BaseGunWieldable, BaseCentcommContraband ]
  id: WeaponLeverChester
  description: An improved lever-action rifle designed to fire specialized 8 gauge ammunition for rapid threat removal.
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Weapons/Guns/Lever/chester.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: _Goobstation/Objects/Weapons/Guns/Lever/chester.rsi
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineShotgunLeverRifle
        insertSound: /Audio/Weapons/Guns/MagIn/rifle_load.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/sfrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
          - MagazineShotgunLeverRifle
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        priority: 1
        whitelist:
          tags:
          - ShellShotgunHeavy
  - type: Gun
    fireRate: 0.65
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/batrifle.ogg
  - type: ChamberMagazineAmmoProvider
    autoCycle: false
    autoEject: true
    soundAutoEject:
      path: /Audio/_Goobstation/Weapons/Guns/MagOut/garand_eject.ogg
    soundRack:
      path: /Audio/Weapons/Guns/Cock/batrifle_cock.ogg
      params:
        volume: -3
    soundBoltClosed:
      path: /Audio/Weapons/Guns/Bolt/lever_bolt_closed.ogg
      params:
        volume: -3
    soundBoltOpened:
      path: /Audio/Weapons/Guns/Bolt/lever_bolt_opened.ogg
      params:
        volume: -3
  - type: GunRequiresWield
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance
  - type: UseDelay
    delay: 0.1
  - type: UseDelayBlockShoot
  - type: Item
    size: Large
    shape:
    - 0,0,4,1
    storedRotation: 45
