- type: entity
  name: BaseSMG
  parent: [BaseItem, GunLight]
  id: BaseWeaponSubMachineGun
  description: A rooty tooty point and shooty.
  abstract: true
  components:
  - type: RestrictByUserTag
    doestContain:
    - Abductor
    messages:
    - abductor-gun-restricted-1
  - 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: MagazinePistolSubMachineGunSP
        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
        startingItem: CartridgePistolSP
        priority: 1
        whitelist:
          tags:
          - CartridgePistol
  - type: ContainerContainer
    containers:
      gun_magazine: !type:ContainerSlot
      gun_chamber: !type:ContainerSlot
  - type: StaticPrice
    price: 500
  # Sunrise start
  - type: EmitSoundOnPickup
    sound:
      collection: RiflesPickUp
  - type: EmitSoundOnDrop
    sound:
      collection: RiflesDrop
  - type: EmitSoundOnLand
    sound:
      collection: RiflesDrop
  - type: CursorOffsetRequiresWield
  - type: EyeCursorOffset
    maxOffset: 2
    pvsIncrease: 0.2
  # Sunrise end

- 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:
      collection: ump45 # Sunrise-Edit
  - 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:
      collection: aug # Sunrise-Edit
  - 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: ProjectileBatteryAmmoProvider
    proto: CartridgePistolSP
    fireCost: 100
  - type: Battery
    maxCharge: 3000
    startingCharge: 3000
  - type: BatterySelfRecharger
    autoRecharge: true
    autoRechargeRate: 25
  - 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:
        collection: famas # Sunrise-Edit
        params:
          volume: 10
      selectedMode: Burst
      availableModes:
      - Burst
      - FullAuto
      - SemiAuto
      shotsPerBurst: 3
      burstCooldown: 0.375
    - type: ItemSlots
      slots:
        gun_magazine:
          name: Magazine
          startingItem: MagazinePistolSubMachineGunSP
          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
          startingItem: CartridgePistolSP
          priority: 1
          whitelist:
            tags:
            - CartridgePistol
    - type: MagazineVisuals
      magState: mag
      steps: 5
      zeroVisible: true
    - type: Appearance
    - type: Construction  # Sunrise-start
      graph: DrozdSecurity
      node: start   # Sunrise-end

- 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: Wieldable # Sunrise-start
    unwieldOnUse: false
  - type: GunWieldBonus
    minAngle: -3
    maxAngle: -14 # Sunrise-end
  - type: Gun
    fireRate: 5.5
    minAngle: 4 # Sunrise-edit
    maxAngle: 20  # Sunrise-edit
    angleIncrease: 1.5
    angleDecay: 12  # Sunrise-edit
    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
        startingItem: CartridgePistolFMJ
        priority: 1
        whitelist:
          tags:
          - CartridgePistol
  - type: MagazineVisuals
    magState: mag
    steps: 6
    zeroVisible: true
  - type: Appearance
