- type: entity
  name: BaseSMG
  parent: BaseItem
  id: BaseWeaponSubMachineGun
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: Sprite
  - type: Item
    size: Large
    shape:
    - 0,0,2,1
  - type: Clothing
    sprite: Objects/Weapons/Guns/SMGs/atreides.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: Gun
    minAngle: 2
    maxAngle: 16
    fireRate: 8
    burstFireRate: 8
    angleIncrease: 3
    angleDecay: 16
    selectedMode: FullAuto
    availableModes:
    - SemiAuto
    - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/smg.ogg
    defaultDirection: 1, 0
  - type: ChamberMagazineAmmoProvider
    soundRack:
      path: /Audio/Weapons/Guns/Cock/smg_cock.ogg
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazinePistolSubMachineGun
        insertSound: /Audio/Weapons/Guns/MagIn/smg_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazinePistolSubMachineGun
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        priority: 1
        whitelist:
          tags:
            - CartridgePistol
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: StaticPrice
    price: 500

- type: entity
  name: Atreides
  parent: [BaseWeaponSubMachineGun, BaseMajorContraband]
  id: WeaponSubMachineGunAtreides
  description: A rare machine pistol hailing from the Corporate Wars. Its extremely high fire rate and compact profile make it useful in close quarters combat. Despite its age, it is in remarkably good condition. Feeds from .35 SMG magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/SMGs/atreides.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Gun
    fireRate: 10
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/atreides.ogg
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true
  - type: Appearance

- type: entity
  name: C-20r submachine gun
  parent: [BaseWeaponSubMachineGun, BaseSyndicateContraband]
  id: WeaponSubMachineGunC20r
  description: A classic and widespread submachine gun, infamous for its use by the Gorlex Marauders. One of the first homegrown Waffle Corp. designs, it remains in service today. Feeds from .35 SMG magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/SMGs/c20r.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-0
      map: ["enum.GunVisualLayers.Mag"]
  - type: Clothing
    sprite: Objects/Weapons/Guns/SMGs/c20r.rsi
  - type: Wieldable
    unwieldOnUse: false
  - type: GunWieldBonus
    minAngle: -19
    maxAngle: -16
  - type: Gun
    minAngle: 21
    maxAngle: 32
    shotsPerBurst: 5
    availableModes:
    - Burst
    - FullAuto
    - SemiAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/c-20r.ogg
  - type: ChamberMagazineAmmoProvider
    autoEject: true
  - type: MagazineVisuals
    magState: mag
    steps: 6
    zeroVisible: true
  - type: Appearance
  - type: StaticPrice
    price: 5000

- type: entity
  name: C-20r ROW #I think ROW stands for Recharging Onboard Weapon so i'm following the L6C's example
  id: WeaponSubMachineGunC20rROW
  parent: BaseItem
  description: A burst-fire C-20r submachine gun for use by cyborgs. Creates .35 caliber ammo on the fly from an internal ammo fabricator, which slowly self-charges.
  components:
  - type: Gun
    minAngle: 2
    maxAngle: 16
    angleIncrease: 4
    angleDecay: 16
    fireRate: 8
    burstFireRate: 8
    selectedMode: Burst
    availableModes:
    - Burst
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/c-20r.ogg
  - type: Sprite
    sprite: Objects/Weapons/Guns/SMGs/c20r.rsi
    layers:
    - state: base
      map: ["enum.GunVisualLayers.Base"]
    - state: mag-5
      map: ["enum.GunVisualLayers.Mag"]
  - type: Item
    size: Huge
  - type: ContainerContainer
    containers:
      ballistic-ammo: !type:Container
  - type: BallisticAmmoProvider
    whitelist:
      tags:
      - CartridgePistol
    capacity: 30
    proto: CartridgePistol
    cycleable: false # No synthesizing ammo for your syndicate masters.
  - type: BallisticAmmoSelfRefiller
    autoRefillRate: 4s
    affectedByEmp: true
  - type: AmmoCounter

- type: entity
  name: Drozd
  parent: [BaseWeaponSubMachineGun, BaseSecurityContraband]
  id: WeaponSubMachineGunDrozd
  description: A modern SMG manufactured by Nanotrasen’s Small Arms Division. It features an exceptional rate of fire in burst mode, useful for holding defensive angles or engaging hostiles at longer ranges. Feeds from .35 SMG magazines.
  components:
    - type: Sprite
      sprite: Objects/Weapons/Guns/SMGs/drozd.rsi
      layers:
        - state: base
          map: ["enum.GunVisualLayers.Base"]
        - state: mag-0
          map: ["enum.GunVisualLayers.Mag"]
    - type: Clothing
      sprite: Objects/Weapons/Guns/SMGs/drozd.rsi
    - type: Wieldable
      unwieldOnUse: false
    - type: GunWieldBonus
      minAngle: -19
      maxAngle: -16
    - type: Gun
      minAngle: 21
      maxAngle: 32
      fireRate: 6
      burstFireRate: 18
      soundGunshot:
        path: /Audio/Weapons/Guns/Gunshots/atreides.ogg
      selectedMode: Burst
      availableModes:
      - Burst
      - FullAuto
      - SemiAuto
      shotsPerBurst: 3
      burstCooldown: 0.375
    - type: ItemSlots
      slots:
        gun_magazine:
          name: Magazine
          startingItem: MagazinePistolSubMachineGun
          insertSound: /Audio/Weapons/Guns/MagIn/smg_magin.ogg
          ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg
          priority: 2
          whitelist:
            tags:
              - MagazinePistolSubMachineGun
          whitelistFailPopup: gun-magazine-whitelist-fail
        gun_chamber:
          name: Chamber
          priority: 1
          whitelist:
            tags:
              - CartridgePistol
    - type: MagazineVisuals
      magState: mag
      steps: 5
      zeroVisible: true
    - type: Appearance

- type: entity
  name: WT550
  parent: [BaseWeaponSubMachineGun, BaseSecurityContraband]
  id: WeaponSubMachineGunWt550
  description: A truly unique firearm, the WT550 was designed by Nanotrasen's Small Arms Division as a compact submachine gun fully controllable with one hand. It contains an exotic internal recoil buffer and feeds from special top-mounted .35 magazines.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/SMGs/wt550.rsi
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: base-unshaded
        map: ["enum.GunVisualLayers.BaseUnshaded"]
        shader: unshaded
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
      - state: mag-unshaded-0
        map: ["enum.GunVisualLayers.MagUnshaded"]
        shader: unshaded
  - type: Clothing
    sprite: Objects/Weapons/Guns/SMGs/wt550.rsi
  - type: ChamberMagazineAmmoProvider
    boltClosed: null
  - type: Gun
    fireRate: 5.5
    minAngle: 1
    maxAngle: 6
    angleIncrease: 1.5
    angleDecay: 6
    selectedMode: FullAuto
    shotsPerBurst: 5
    burstCooldown: 0.2
    burstFireRate: 7
    availableModes:
    - Burst
    - FullAuto
    - SemiAuto
  - type: ItemSlots
    slots:
      gun_magazine:
        name: Magazine
        startingItem: MagazinePistolSubMachineGunTopMounted
        insertSound: /Audio/Weapons/Guns/MagIn/smg_magin.ogg
        ejectSound: /Audio/Weapons/Guns/MagOut/smg_magout.ogg
        priority: 2
        whitelist:
          tags:
            - MagazinePistolSubMachineGunTopMounted
        whitelistFailPopup: gun-magazine-whitelist-fail
      gun_chamber:
        name: Chamber
        priority: 1
        whitelist:
          tags:
            - CartridgePistol
  - type: MagazineVisuals
    magState: mag
    steps: 6
    zeroVisible: true
  - type: Appearance

- type: entity
  name: brown briefcase
  parent: [BaseWeaponSubMachineGun]
  id: WeaponSubMachineGunBriefcase
  description: Useful for carrying items in your hands.
  suffix: Gun
  components:
  - type: Item
    size: Ginormous
    inhandVisuals:
      left:
        - sprite: Objects/Storage/Briefcases/briefcase_brown.rsi
          state: inhand-left
        - state: inhand-left-muzzle
      right:
        - sprite: Objects/Storage/Briefcases/briefcase_brown.rsi
          state: inhand-right
        - state: inhand-right-muzzle
  - type: Sprite
    sprite: Objects/Weapons/Guns/SMGs/briefcase.rsi
    layers:
    - sprite: Objects/Storage/Briefcases/briefcase_brown.rsi
      state: icon
    - state: icon-muzzle
      map: ["enum.GunVisualLayers.Base"]
  - type: Gun
    fireRate: 9
    minAngle: 25
    maxAngle: 32
    availableModes:
    - FullAuto
    soundGunshot:
      path: /Audio/Weapons/Guns/Gunshots/atreides.ogg
  - type: ChamberMagazineAmmoProvider
    autoEject: false
  - type: Appearance
  - type: StaticPrice
    price: 5000
  - type: MeleeWeapon
    damage:
      types:
        Blunt: 8
