# Empty mags
- type: entity
  id: BaseMagazineLightRifle
  name: "magazine (.30 rifle)"
  parent: [ BaseItem, BaseSecurityContraband ]
  abstract: true
  components:
  - type: Tag
    tags:
      - MagazineLightRifle
  - type: BallisticAmmoProvider
    mayTransfer: true
    whitelist:
      tags:
        - CartridgeLightRifle
    proto: CartridgeLightRifleSP
    capacity: 30
  - type: Item
    size: Small
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/Magazine/LightRifle/light_rifle_mag.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
  - type: MagazineVisuals
    magState: mag
    steps: 2
    zeroVisible: false
  - type: Appearance

# Magazines
# - type: entity # Sunrise-edtit #Moved to _sunrise/xxx/rifle.yml
#   id: MagazineRifleBoxSP
#   name: "L6 SAW magazine box (.30 rifle SP)"
#   parent: BaseMagazineLightRifle
#   description: Box containing a 100-round belt of linked .30 rifle rounds, used by light machine guns such as the L6. Intended to hold general-purpose kinetic ammunition.
#   components:
#   - type: Tag
#     tags:
#       - MagazineLightRifleBox
#   - type: BallisticAmmoProvider
#     proto: CartridgeLightRifleSP
#     capacity: 100
#   - type: Item
#   - type: Sprite
#     sprite: Objects/Weapons/Guns/Ammunition/Magazine/LightRifle/light_rifle_box.rsi
#   - type: MagazineVisuals
#     magState: mag
#     steps: 8
#     zeroVisible: false
#   - type: Appearance

- type: entity
  id: MagazineLightRifleEmpty
  name: "magazine (.30 rifle any)"
  suffix: empty
  parent: BaseMagazineLightRifle
  components:
  - type: BallisticAmmoProvider
    proto: null
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]

- type: entity
  id: MagazineLightRiflePractice
  name: "magazine (.30 rifle practice)"
  parent: BaseMagazineLightRifle
  description: Curved 30-round double stack magazine for combat rifles. Intended to hold non-harmful chalk ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeLightRiflePractice
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#dbdbdb"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#dbdbdb"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#dbdbdb"

- type: entity
  id: MagazineLightRifleUranium
  name: "magazine (.30 rifle uranium)"
  parent: BaseMagazineLightRifle
  description: Curved 30-round double stack magazine for combat rifles. Intended to hold exotic uranium-core ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeLightRifleUranium
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#00cd42"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#00cd42"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#00cd42"

- type: entity
  id: MagazineLightRifleIncendiary
  name: "magazine (.30 rifle incendiary)"
  parent: BaseMagazineLightRifle
  description: Curved 30-round double stack magazine for combat rifles. Intended to hold self-igniting incendiary ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeLightRifleIncendiary
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#ff6e52"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#ff6e52"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#ff6e52"
