# region Rifle
- type: entity
  id: MagazineRifleSP
  name: "magazine (.20 rifle SP)"
  parent: BaseMagazineRifle
  description: 25-round double stack magazine for combat rifles. Intended to hold general-purpose kinetic ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleSP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#575EF5"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#575EF5"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#575EF5"

- type: entity
  id: MagazineRifleHP
  name: "magazine (.20 rifle HP)"
  parent: BaseMagazineRifle
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleHP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#F5514C"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#F5514C"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#F5514C"

- type: entity
  id: MagazineRifleFMJ
  name: "magazine (.20 rifle FMJ)"
  parent: BaseMagazineRifle
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleFMJ
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]

- type: entity
  id: MagazineRifleAP
  name: "magazine (.20 rifle AP)"
  parent: BaseMagazineRifle
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleAP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#540000"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#540000"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#540000"

# region M-52
- type: entity
  id: BaseMagazineRifleM52
  parent: BaseMagazineRifle
  abstract: true
  components:
  - type: BallisticAmmoProvider
    capacity: 40
  - type: Tag
    tags:
    - MagazineRifleM52
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Ammunition/Magazine/Rifle/m-52.rsi
  - type: MagazineVisuals
    magState: mag
    steps: 7
    zeroVisible: false

- type: entity
  id: MagazineRifleM52SP
  name: "magazine (.20 rifle SP)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleSP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#575EF5"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#575EF5"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#575EF5"

- type: entity
  id: MagazineRifleM52HP
  name: "magazine (.20 rifle HP)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleHP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#F5514C"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#F5514C"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#F5514C"

- type: entity
  id: MagazineRifleM52FMJ
  name: "magazine (.20 rifle FMJ)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleFMJ
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#080706"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#080706"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#080706"

- type: entity
  id: MagazineRifleM52AP
  name: "magazine (.20 rifle AP)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleAP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#540000"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#540000"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#540000"

- type: entity
  id: MagazineRifleM52Empty
  name: "magazine (.20 rifle any)"
  suffix: empty
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: null
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      right:
      - state: inhand-right-mag

- type: entity
  id: MagazineRifleM52Incendiary
  name: "magazine (.20 rifle incendiary)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleIncendiary
  - 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"

- type: entity
  id: MagazineRifleM52Practice
  name: "magazine (.20 rifle practice)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRiflePractice
  - 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: MagazineRifleM52Uranium
  name: "magazine (.20 rifle uranium)"
  parent: BaseMagazineRifleM52
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleUranium
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: stripe
      color: "#40F57A"
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-stripe
        color: "#40F57A"
      right:
      - state: inhand-right-mag
      - state: inhand-right-stripe
        color: "#40F57A"

# region LMG L6 SAW
- type: entity
  id: MagazineRifleBoxSP
  name: "L6 SAW magazine box (.20 rifle SP)"
  parent: BaseMagazineRifle
  description: Box containing a 150-round belt of linked .20 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: CartridgeRifleSP
    capacity: 150
  - 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: MagazineRifleBoxEmpty
  name: "L6 SAW magazine box (.20 rifle any)"
  parent: MagazineRifleBoxSP
  description: Box containing a 150-round belt of linked .20 rifle rounds, used by light machine guns such as the L6.
  components:
  - type: Tag
    tags:
      - MagazineLightRifleBox
  - type: BallisticAmmoProvider
    proto: null
  - 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: MagazineRifleBoxFMJ
  name: "L6 SAW magazine box (.20 rifle FMJ)"
  parent: MagazineRifleBoxSP
  description: Box containing a 150-round belt of linked .20 rifle rounds, used by light machine guns such as the L6. Intended to hold FMJ kinetic ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleFMJ

- type: entity
  id: MagazineRifleBoxIncendiary
  name: "L6 SAW magazine box (.20 rifle incendiary)"
  parent: MagazineRifleBoxSP
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleIncendiary
  - type: Sprite
    layers:
    - state: red
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]

- type: entity
  id: MagazineRifleBoxUranium
  name: "L6 SAW magazine box (.20 rifle uranium)"
  parent: MagazineRifleBoxSP
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleUranium
  - type: Sprite
    layers:
    - state: uranium
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
