# SPDX-FileCopyrightText: 2020 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2020 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2020 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2020 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2020 V�ctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 py01 <pyronetics01@gmail.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2022 ElectroJr <leonsfriedrich@gmail.com>
# SPDX-FileCopyrightText: 2022 Fishfish458 <47410468+Fishfish458@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 ScalyChimp <72841710+scaly-chimp@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Scribbles0 <91828755+Scribbles0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <le0nel_1van@hotmail.com>
# SPDX-FileCopyrightText: 2022 Veritius <veritiusgaming@gmail.com>
# SPDX-FileCopyrightText: 2022 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 sewerpig <97814211+sewerpig@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Dawid Bla <46636558+DawBla@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TaralGit <76408146+TaralGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 and_a <and_a@DESKTOP-RJENGIR>
# SPDX-FileCopyrightText: 2023 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Avalon <148660190+BYONDFuckery@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Fenn <162015305+TooSillyFennec@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hmeister <nathan.springfredfoxbon4@gmail.com>
# SPDX-FileCopyrightText: 2024 Jonathan Argo <jonathan.argo@gmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 RealFakeSoof <william_r_dunn@yahoo.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 vanx <#vanxxxx>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 Eagle <lincoln.mcqueen@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 PunishedJoe <PunishedJoeseph@proton.me>
# SPDX-FileCopyrightText: 2025 SX_7 <sn1.test.preria.2002@gmail.com>
# SPDX-FileCopyrightText: 2025 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Theodore Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 Whatstone <whatston3@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
# SPDX-FileCopyrightText: 2025 vanx <61917534+Vaaankas@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: BaseWeaponSniper
  parent: BaseItem
  id: BaseWeaponSniper
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
  - type: Item
    size: Huge
  - type: Clothing
    sprite: Objects/Weapons/Guns/Snipers/bolt_gun_wood.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: Gun
    fireRate: 0.75
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/sniper.ogg
  - type: BallisticAmmoProvider
    autoCycle: false # Goobstation
    capacity: 10
    proto: CartridgeLightRifle
    whitelist:
      tags:
      - CartridgeLightRifle
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
        ents: []
  - type: StaticPrice
    price: 500
  # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      collection: SnipersPickUp
  - type: EmitSoundOnDrop
    sound:
      collection: SnipersDrop
  - type: EmitSoundOnLand
    sound:
      collection: SnipersDrop
  # Goobstation edit end
  - type: MeleeWeapon # Goobstation V
    damage:
      types:
       Blunt: 12
    angle: 0
    wideAnimationRotation: 90 # -90 if it takes bayonets (hits with muzzle) 90 if not (hits with butt)
    soundHit:
      collection: MetalThud # Goobstation ^

# Goobstation - Start - I decided to put it here, because it changes Hristov.
- type: entity
  name: BaseMagazineSniper
  parent: [BaseItem, BaseGunWieldable]
  id: BaseWeaponSniperMagazine
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
  - type: Item
    sprite: Objects/Weapons/Guns/Snipers/heavy_sniper.rsi
    size: Huge
    shape:
      - 0,0,6,1
    storedRotation: 45
  - type: Clothing
    sprite: Objects/Weapons/Guns/Snipers/bolt_gun_wood.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: Gun
    fireRate: 0.75
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/sniper.ogg
  - type: ChamberMagazineAmmoProvider
    autoCycle: false
    soundRack:
      path: /Audio/Weapons/Guns/Cock/sf_rifle_cock.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazineAntiMateriel
        insertSound: /Audio/Weapons/Guns/MagIn/rifle_load.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/sfrifle_magout.ogg
        priority: 2
        whitelist:
          tags:
          - MagazineAntiMateriel
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        startingItem: CartridgeAntiMateriel
        priority: 1
        whitelist:
          tags:
          - CartridgeAntiMateriel
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: StaticPrice
    price: 500
# Goobstation - End

- type: entity
  name: Kardashev-Mosin
  parent: [BaseWeaponSniper, BaseGunWieldable, BaseMajorContraband]
  id: WeaponSniperMosin
  description: A true relic, the Kardashev-Mosin has served in nearly every armed conflict since its creation 670 years ago. The bolt-action design of the rifle remains virtually identical to its original design, whether used for hunting, sniping, or endless trench warfare. Loads 10 rounds of .30 rifle.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Snipers/bolt_gun_wood.rsi
    layers:
    - state: base
    - state: base1
      map: [ "enum.SolutionContainerLayers.Fill" ]
      visible: false
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 1
    fillBaseName: base
    inHandsFillBaseName: -fill-
    inHandsMaxFillLevels: 1
    equippedFillBaseName: -fill-
    equippedMaxFillLevels: 1
  - type: MeleeWeapon
    wideAnimationRotation: -135
    animationRotation: -135 # WWDP
    damage:
      types:
        Piercing: 12
    angle: 0
    animation: WeaponArcThrust
    soundHit:
      path: /Audio/Weapons/bladeslice.ogg
  - type: MeleeRequiresWield
  - type: AltFireMelee
    attackType: Heavy
  - type: SolutionContainerManager
    solutions:
      melee:
        maxVol: 2
  - type: MeleeChemicalInjector
    solution: melee
  - type: RefillableSolution
    solution: melee
  - type: InjectableSolution
    solution: melee
  - type: SolutionTransfer
    maxTransferAmount: 2
  - type: Sharp
    butcherDelayModifier: 2 #It's a bayonet
  - type: GunRequiresWield
  - type: StaticPrice
    price: 500
  - type: Item  # Goob edit
    size: Large
    storedRotation: 45
  - type: ScannableForPoints # goob edit
    points: 2

- type: entity
  name: Hristov
  parent: [BaseWeaponSniperMagazine, BaseGunWieldable, BaseSyndicateContraband]
  id: WeaponSniperHristov
  description: For when you absolutely, positively need to make someone regret their life choices from a safe distance. Uses .60 anti-materiel ammo.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Snipers/heavy_sniper.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Snipers/heavy_sniper.rsi
  - type: GunRequiresWield
  - type: Gun
    # fireRate: 0.4 # Goobstation
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/sniper.ogg
    resetOnHandSelected: false # Goobstation - quickscope pro
  #- type: BallisticAmmoProvider - Goobstation - Magazine Sniper
  #  whitelist:
  #    tags:
  #    - CartridgeAntiMateriel
  #  capacity: 5
  #  proto: CartridgeAntiMateriel
  - type: SpeedModifiedOnWield
    walkModifier: 0.8 # goob edit V
    sprintModifier: 0.8 # goob edit ^
  - type: CursorOffsetRequiresWield
  - type: EyeCursorOffset
    maxOffset: 8 # Goobstation - Sniper rifles buff
    pvsIncrease: 0.8 # Goobstation - Sniper rifles buff
  - type: StaticPrice
    price: 3500

- type: entity
  name: musket
  parent: [ BaseWeaponSniper, BaseGunWieldable, BaseMajorContraband ]
  id: Musket
  description: This should've been in a museum long before you were born. Uses .60 anti-materiel ammo.
  components:
  - type: Sharp
  - type: Item
    size: Large
  - type: Sprite
    sprite: Objects/Weapons/Guns/Snipers/musket.rsi
    state: base
  - type: Clothing
    sprite: Objects/Weapons/Guns/Snipers/musket.rsi
  - type: Gun
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
  - type: UseDelayOnShoot
  - type: UseDelay
    delay: 8 #it's a musket
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - CartridgeAntiMateriel
    capacity: 1
    proto: CartridgeAntiMateriel
  #- type: MeleeWeapon # Goobstation - commented this out cause it breaks NPCs and it doesn't work anyway lol
  #  wideAnimationRotation: -135
  #  damage:
  #    types:
  #      Piercing: 15 #you fucking stab em
  #      Bloodloss: 2 #no way to apply bleed, triangular bayonet wounds are hard to fix(source:that one copypasta)
  # angle: 0
  # animation: WeaponArcThrust
  # soundHit:
  #   path: /Audio/Weapons/bladeslice.ogg
  - type: GunRequiresWield

- type: entity
  name: flintlock pistol
  parent: [BaseWeaponSniper, BaseMajorContraband]
  id: WeaponPistolFlintlock
  description: A pirate's companion. Yarrr! Uses .45 magnum ammo.
  components:
  - type: Gun
    minAngle: 0
    maxAngle: 30 #miss him entirely because the barrel is smoothbore
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    - 0,1,0,1
    storedRotation: 0
  - type: Sprite
    sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi
  - type: Clothing
    sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi
  - type: UseDelayOnShoot
  - type: UseDelay
    delay: 8 #it's a flintlock
  - type: BallisticAmmoProvider
    whitelist:
      tags:
        - CartridgeMagnum # changed from Anti-material rifle rounds because it's a flintlock pistol not a Hristov
    capacity: 1
    proto: CartridgeMagnum
  - type: StaticPrice
    price: 0

- type: entity
  parent: WeaponPistolFlintlock
  id: WeaponPistolFlintlockEmpty
  suffix: Empty
  components:
  - type: BallisticAmmoProvider
    proto: null
