# Empty mags
- type: entity
  abstract: true
  parent: [ BaseItem, BaseSecurityContraband ]
  id: BaseMagazineLightRifle
  name: "magazine (.30 rifle)"
  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
  parent: BaseMagazineLightRifle
  id: MagazineLightRifleBoxSP
  name: "L6 SAW magazine box (.30 rifle SP)"
  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
  parent: BaseMagazineLightRifle
  id: MagazineLightRifleSP
  name: "magazine (.30 rifle SP)"
  description: Curved 30-round double stack magazine for combat rifles. Intended to hold general-purpose kinetic ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeLightRifleSP
  - type: Sprite
    layers:
    - state: sp
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]

- type: entity
  parent: MagazineLightRifleSP
  id: MagazineLightRifleEmpty
  name: "magazine (.30 rifle any)"
  suffix: empty
  description: Curved 30-round double stack magazine for combat rifles.
  components:
  - type: BallisticAmmoProvider
    proto: null
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      right:
      - state: inhand-right-mag

- type: entity
  parent: BaseMagazineLightRifle
  id: MagazineLightRiflePractice
  name: "magazine (.30 rifle practice)"
  description: Curved 30-round double stack magazine for combat rifles. Intended to hold harmless practice 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
  parent: BaseMagazineLightRifle
  id: MagazineLightRifleUranium
  name: "magazine (.30 rifle uranium)"
  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
  parent: BaseMagazineLightRifle
  id: MagazineLightRifleIncendiary
  name: "magazine (.30 rifle incendiary)"
  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: incendiary
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
