- type: entity
  id: BaseMagazineRifle
  name: "magazine (.20 rifle)"
  parent: [ BaseItem, BaseSecurityContraband ]
  abstract: true
  components:
  - type: Tag
    tags:
      - MagazineRifle
  - type: Item
    size: Small
  - type: BallisticAmmoProvider
    mayTransfer: true
    whitelist:
      tags:
        - CartridgeRifle
    capacity: 25
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/Magazine/Rifle/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

- type: entity
  id: MagazineRifle
  name: "magazine (.20 rifle)"
  parent: BaseMagazineRifle
  description: 25-round double stack magazine for combat rifles. Intended to hold general-purpose kinetic ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifle
  - 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
  id: MagazineRifleEmpty
  name: "magazine (.20 rifle any)"
  suffix: empty
  parent: MagazineRifle
  description: 25-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
  id: MagazineRifleIncendiary
  name: "magazine (.20 rifle incendiary)"
  parent: MagazineRifle
  description: 25-round double stack magazine for combat rifles. Intended to hold self-igniting incendiary ammunition.
  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: MagazineRiflePractice
  name: "magazine (.20 rifle practice)"
  parent: BaseMagazineRifle
  description: 25-round double stack magazine for combat rifles. Intended to hold non-harmful chalk ammunition.
  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: MagazineRifleUranium
  name: "magazine (.20 rifle uranium)"
  parent: BaseMagazineRifle
  description: 25-round double stack magazine for combat rifles. Intended to hold exotic uranium-core ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeRifleUranium
  - 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"
