# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  abstract: true
  parent: BaseItem
  id: BaseMagazineBoxCaselessRifle
  name: ammunition box (9.5mm HP) # Goob edit
  components:
  # Goobstation edit start
  - 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
  # Goobstation edit end
  - type: BallisticAmmoProvider
    mayTransfer: true
    whitelist:
      tags:
        - CartridgeCaselessRifle
    proto: CartridgeCaselessRifle
    capacity: 60
  - type: Item
    size: Small
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/Boxes/caseless_rifle.rsi
  - type: MagazineVisuals
    magState: mag
    steps: 4
    zeroVisible: false
  - type: Appearance

# Boxes
- type: entity
  parent: BaseMagazineBoxCaselessRifle
  id: MagazineBoxCaselessRifle10x24
  name: ammunition box (9.5mm HP) # Goob edit
  components:
  - type: BallisticAmmoProvider
    capacity: 200
    proto: CartridgeCaselessRifle
  - type: Sprite
    layers:
    - state: base-10x24
      map: ["enum.GunVisualLayers.Base"]
    - state: mag10-1
      map: ["enum.GunVisualLayers.Mag"]
  - type: MagazineVisuals
    magState: mag10
    steps: 4
    zeroVisible: false
  - type: Appearance

- type: entity
  parent: BaseMagazineBoxCaselessRifle
  id: MagazineBoxCaselessRifleBig
  name: ammunition box (9.5mm HP) # Goob edit
  components:
  - type: BallisticAmmoProvider
    capacity: 200
    proto: CartridgeCaselessRifle
  - type: Sprite
    layers:
    - state: base-b
      map: ["enum.GunVisualLayers.Base"]
    - state: magb-1
      map: ["enum.GunVisualLayers.Mag"]
  - type: MagazineVisuals
    magState: magb
    steps: 4
    zeroVisible: false
  - type: Appearance

- type: entity
  parent: BaseMagazineBoxCaselessRifle
  id: MagazineBoxCaselessRifle
  name: ammunition box (9.5mm HP)
  description: A cardboard box of 9.5mm caseless rounds. Intended to hold general-purpose kinetic ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeCaselessRifle
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]

- type: entity
  parent: BaseMagazineBoxCaselessRifle
  id: MagazineBoxCaselessRiflePractice
  name: ammunition box (9.5mm practice) # Goob and Goob v
  description: A cardboard box of 9.5mm caseless rounds. Intended to hold harmless practice ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeCaselessRiflePractice
  - type: Sprite
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
    - state: practice
