- type: entity
  abstract: true
  parent: [ BaseItem, BaseSecurityContraband ]
  id: BaseSpeedLoaderMagnum
  name: "speed loader (.45 magnum)"
  components:
  - type: Tag
    tags:
      - SpeedLoaderMagnum
  - type: SpeedLoader
  - type: BallisticAmmoProvider
    whitelist:
      tags:
        - CartridgeMagnum
    capacity: 6
  - type: Sprite
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
        ents: []
  # Harmony Start
  - type: Item
    size: Tiny
  # Harmony END

- type: entity
  parent: BaseSpeedLoaderMagnum
  id: SpeedLoaderMagnum
  name: "speed loader (.45 magnum)"
  description: Designed to quickly load up to six rounds of .45 magnum into an empty revolver. Intended to hold general-purpose kinetic ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeMagnum
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/SpeedLoaders/Magnum/magnum_speed_loader.rsi
    layers:
      - state: base
        map: [ "enum.GunVisualLayers.Base" ]
      - state: base-6
        map: [ "enum.GunVisualLayers.Mag" ]
  - type: MagazineVisuals
    magState: base
    steps: 7
    zeroVisible: false
  - type: Appearance
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-ammo
      right:
      - state: inhand-right-mag
      - state: inhand-right-ammo

- type: entity
  parent: SpeedLoaderMagnum
  id: SpeedLoaderMagnumEmpty
  name: "speed loader (.45 magnum any)"
  suffix: empty
  description: Designed to quickly load up to six rounds of .45 magnum into an empty revolver.
  components:
  - type: BallisticAmmoProvider
    proto: null
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/SpeedLoaders/Magnum/magnum_speed_loader.rsi
    layers:
      - state: base
        map: [ "enum.GunVisualLayers.Base" ]
      # TODO: This is actually a issue with all the speed loaders:
      #       You can mix different ammo types, but it will always
      #       use the one it was printed for.
      - state: base-6
        map: [ "enum.GunVisualLayers.Mag" ]
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      right:
      - state: inhand-right-mag

- type: entity
  parent: SpeedLoaderMagnum
  id: SpeedLoaderMagnumIncendiary
  name: "speed loader (.45 magnum incendiary)"
  description: Designed to quickly load up to six rounds of .45 magnum into an empty revolver. Intended to hold self-igniting incendiary ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeMagnumIncendiary

- type: entity
  parent: BaseSpeedLoaderMagnum
  id: SpeedLoaderMagnumPractice
  name: "speed loader (.45 magnum practice)"
  description: Designed to quickly load up to six rounds of .45 magnum into an empty revolver. Intended to hold harmless practice ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeMagnumPractice
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/SpeedLoaders/Magnum/magnum_speed_loader.rsi
    layers:
      - state: base
        map: [ "enum.GunVisualLayers.Base" ]
      - state: practice-6
        map: [ "enum.GunVisualLayers.Mag" ]
  - type: MagazineVisuals
    magState: practice
    steps: 7
    zeroVisible: false
  - type: Appearance
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-ammo
      - state: inhand-left-stripe
        color: "#ea5800"
      right:
      - state: inhand-right-mag
      - state: inhand-right-ammo
      - state: inhand-right-stripe
        color: "#ea5800"

- type: entity
  parent: BaseSpeedLoaderMagnum
  id: SpeedLoaderMagnumAP
  name: "speed loader (.45 magnum armor-piercing)"
  description: Designed to quickly load up to six rounds of .45 magnum into an empty revolver. Intended to hold specialized armor-piercing ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeMagnumAP
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/SpeedLoaders/Magnum/magnum_speed_loader.rsi
    layers:
      - state: base
        map: [ "enum.GunVisualLayers.Base" ]
      - state: piercing-6
        map: [ "enum.GunVisualLayers.Mag" ]
  - type: MagazineVisuals
    magState: piercing
    steps: 7
    zeroVisible: false
  - type: Appearance
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-ammo
      - state: inhand-left-stripe
        color: "#540000"
      right:
      - state: inhand-right-mag
      - state: inhand-right-ammo
      - state: inhand-right-stripe
        color: "#540000"

- type: entity
  parent: BaseSpeedLoaderMagnum
  id: SpeedLoaderMagnumUranium
  name: "speed loader (.45 magnum uranium)"
  description: Designed to quickly load up to six rounds of .45 magnum into an empty revolver. Intended to hold exotic uranium-core ammunition.
  components:
  - type: BallisticAmmoProvider
    proto: CartridgeMagnumUranium
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/SpeedLoaders/Magnum/magnum_speed_loader.rsi
    layers:
      - state: base
        map: [ "enum.GunVisualLayers.Base" ]
      - state: uranium-6
        map: [ "enum.GunVisualLayers.Mag" ]
  - type: MagazineVisuals
    magState: uranium
    steps: 7
    zeroVisible: false
  - type: Appearance
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-mag
      - state: inhand-left-ammo
      - state: inhand-left-stripe
        color: "#00cd42"
      right:
      - state: inhand-right-mag
      - state: inhand-right-ammo
      - state: inhand-right-stripe
        color: "#00cd42"
