- type: entity
  parent: RMCSmartGunNoCamo
  id: AU14SmartGunUPP
  name: RVS-37 automated machinegun
  description: Copy of the M56 Smartgun, the RVS-37 "Canyon", produced by major countries inside of UPP.
  components:
  - type: Sprite
    sprite: _AU14/Weapons/Guns/UPP/rvs-37.rsi
    layers:
    - state: base
      sprite: _AU14/Weapons/Guns/UPP/rvs-37.rsi
    - state: mag-0
      sprite: _AU14/Weapons/Guns/UPP/rvs-37.rsi
      map: [ "enum.GunVisualLayers.Mag" ]
  - type: Clothing
    sprite: _AU14/Weapons/Guns/UPP/rvs-37.rsi
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: AU14MagazineSmartGunUPP
        insertSound: /Audio/_RMC14/Weapons/Guns/Reload/gun_sg_reload.ogg
        ejectSound: /Audio/_RMC14/Weapons/Guns/Reload/gun_sg_unload.ogg
        priority: 2
        whitelist:
          tags:
          - AU14MagazineSmartGunUPP
      cell_slot:
        name: power-cell-slot-component-slot-name-default
        startingItem: AU14PowerCellSmartgunUPP
        whitelist:
          components:
          - SmartGunBattery

- type: entity
  parent: CMMagazineRifleBase
  id: AU14MagazineSmartGunUPP
  name: "RVS-37 drum magazine (12.7x40mm)"
  components:
  - type: Tag
    tags:
    - AU14MagazineSmartGunUPP
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - AU14CartridgeSmartGun127x40mm
    proto: AU14CartridgeSmartGun127x40mm
    capacity: 250
  - type: Sprite
    sprite: _AU14/Weapons/Guns/Ammo/Magazines/rvs34_mag.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-1
      map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    slots:
    - suitStorage
  - type: RefillableByBulletBox
    bulletType: RMCBoxBulletsSmartGun

- type: entity
  parent: CMBulletBase
  id: AU14CartridgeSmartGun127x40mm
  name: bullet (12.7x40mm)
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _RMC14/Objects/Weapons/Guns/Ammunition/Projectiles/bullet_projectiles.rsi
    layers:
    - state: bullet
      shader: unshaded
  - type: Projectile
    damage:
      types:
        Piercing: 45
  - type: CMArmorPiercing
    amount: 0
  - type: RMCProjectileDamageFalloff
    thresholds:
    - range: 10
      falloff: 9999
      ignoreModifiers: true
    - range: 7
      falloff: 4
  - type: RMCProjectileAccuracy
    accuracy: 105
    thresholds:
    - range: 5
      falloff: 10

- type: entity
  parent: RMCPowerCell
  id: AU14PowerCellSmartgunUPP
  name: GB-12-U3 battery
  description: "UPP standard-issue 12-volt lead-acid battery, used by the UPPAC to power just about anything short of armored vehicles. This one seems to be a variant made to power automated machineguns. Also could be used as a blunt weapon."
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: smartguncell
  - type: Battery
    maxCharge: 10000
    startingCharge: 10000
  - type: SmartGunBattery
  - type: PhysicalComposition
    materialComposition: {}

- type: Tag
  id: AU14MagazineSmartGunUPP

- type: Tag
  id: AU14CartridgeSmartGun127x40mm
