# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BramvanZijp <56019239+BramvanZijp@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX-7 <92227810+SX-7@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: BaseMagazineGrenade
  name: grenade cartridge
  parent: [ BaseItem, BaseSecurityContraband ]
  abstract: true
  components:
  - type: Tag
    tags:
    - MagazineGrenade
  - type: BallisticAmmoProvider
    mayTransfer: true
    whitelist:
      tags:
        - Grenade
    capacity: 5
    soundRack:
      path: /Audio/Weapons/Guns/Bolt/lmg_bolt_closed.ogg
      params:
        variation: 0.05
    soundInsert:
      path: /Audio/Weapons/Guns/MagIn/rifle_load.ogg
      params:
        variation: 0.05
  - type: Item
    size: Large
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/Magazine/Grenade/grenade_cartridge.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-4
      map: ["enum.GunVisualLayers.Mag"]
  - type: MagazineVisuals
    magState: mag
    steps: 5
    zeroVisible: false
  - type: Appearance

- type: entity
  id: MagazineGrenadeEmpty
  name: grenade cartridge
  parent: BaseMagazineGrenade
  components:
  - type: BallisticAmmoProvider

- type: entity
  id: MagazineGrenadeFrag
  name: frag grenade cartridge
  parent: BaseMagazineGrenade
  components:
  - type: BallisticAmmoProvider
    proto: GrenadeFrag

- type: entity
  id: MagazineGrenadeEMP
  name: EMP grenade cartridge
  parent: BaseMagazineGrenade
  components:
  - type: BallisticAmmoProvider
    proto: GrenadeEMP

- type: entity
  id: MagazineGrenadeFlash
  name: flash grenade cartridge
  parent: BaseMagazineGrenade
  components:
  - type: BallisticAmmoProvider
    proto: GrenadeFlash

- type: entity
  id: MagazineGrenadeBlast
  name: blast grenade cartridge
  parent: BaseMagazineGrenade
  components:
  - type: BallisticAmmoProvider
    proto: GrenadeBlast

- type: entity
  id: MagazineGrenadeBaton
  name: baton grenade cartridge
  parent: BaseMagazineGrenade
  components:
  - type: BallisticAmmoProvider
    proto: GrenadeBaton