- type: entity
  abstract: true
  parent: [BaseItem, RecyclableItemCardboard] # Frontier: added RecyclableItemCardboard
  id: BaseAmmoBox46x30mm
  name: ammunition box (4.6x30mm FMJ)
  components:
  - type: BallisticAmmoProvider
    mayTransfer: true
    whitelist:
      tags:
        - Cartridge46x30mmFMJ
    proto: Cartridge46x30mmFMJ
    capacity: 80
  - type: Item
    size: Small
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: Sprite
    sprite: _Mono/Objects/Weapons/Guns/Ammunition/Boxes/4.6x30mm.rsi
  - type: MagazineVisuals
    magState: mag
    steps: 3
    zeroVisible: false
  - type: Tag
    tags:
    - Magazine46x30mmFMJBox
  - type: Appearance
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/handling/ammobox_pickup.ogg
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/_Goobstation/Items/handling/ammobox_drop.ogg
  - type: EmitSoundOnLand
    sound:
      path: /Audio/_Goobstation/Items/handling/ammobox_drop.ogg

#small ammo boxes
- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmFMJ
  name: ammunition box (4.6x30mm FMJ)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmFMJ
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]

- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmPractice
  name: ammunition box (4.6x30mm practice)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmPractice
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: practice

- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmIncendiary
  name: ammunition box (4.6x30mm incendiary)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmIncendiary
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: incendiary

- type: entity
  id: AmmoBox46x30mmUranium
  parent: BaseAmmoBox46x30mm
  name: ammunition box (4.6x30mm uranium)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmUranium
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: uranium

# Upstream
- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmRubber
  name: ammunition box (4.6x30mm rubber)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmRubber
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: rubber

# Frontier
- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmEmp
  name: ammunition box (4.6x30mm emp)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmEmp
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: emp

# Mono AP syst
#anti-flesh:
- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmHP
  name: ammunition box (4.6x30mm hollow-point)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmHP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: HP

- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmRIP
  name: ammunition box (4.6x30mm RIP)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmRIP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: RIP

#armor-piercing:

- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmPlasteelAP
  name: ammunition box (4.6x30mm AP)
  components:
  - type: BallisticAmmoProvider
    proto: Cartridge46x30mmPlasteelAP
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: plasteelAP

#big ammo boxes
- type: entity
  parent: BaseAmmoBox46x30mm
  id: AmmoBox46x30mmBigFMJ
  name: big ammunition box (4.6x30mm FMJ)
  suffix: Big
  components:
  - type: Item
    shape:
    - 0,0,1,1
  - type: BallisticAmmoProvider
    capacity: 280 # 8 mags per box similar to rifle box
    proto: Cartridge46x30mmFMJ
  - type: Sprite
    layers:
    - state: base-b # Frontier: base-big<base-b
      map: ["enum.GunVisualLayers.Base"]
    - state: magb-1 # Frontier: mag-big-1<magb-1
      map: ["enum.GunVisualLayers.Mag"]
  - type: MagazineVisuals
    magState: magb # Frontier: mag-big<magb
    steps: 4
    zeroVisible: false
  - type: Appearance
