#region base weapon
- type: entity
  id: NFBaseItemWeaponGun
  parent: [ BaseC1Contraband, BaseItem ]
  suffix: Frontier
  abstract: true
  components:
  - type: Sprite
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
  - type: Gun
  - type: AmmoCounter
  - type: Appearance
  - type: StaticPrice
    price: 500

- type: entity
  id: NFBaseItemWeaponGunMagazineFed
  parent: NFBaseItemWeaponGun
  abstract: true
  components:
  - type: Sprite
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
      - state: mag-0
        map: ["enum.GunVisualLayers.Mag"]
  - type: MagazineVisuals
    magState: mag
    steps: 1
    zeroVisible: true

#region Encumbrance
# Pistols / Revolvers
- type: entity
  id: NFBaseWeaponEncumbrancePistol
  abstract: true
  components:
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    - 0,1,0,1
  - type: Clothing
    quickEquip: false
    slots:
    - Belt
    - suitStorage
  - type: Tag
    tags:
    - Sidearm

- type: entity
  id: NFBaseWeaponEncumbranceMachinePistol
  parent: NFBaseWeaponEncumbrancePistol
  abstract: true
  components:
  - type: Item
    shape:
    - 0,0,2,0
    - 0,1,0,1

# SMGs
- type: entity
  id: NFBaseWeaponEncumbranceSubMachineGun
  abstract: true
  components:
  - type: Item
    size: Normal
    shape:
    - 0,0,2,2
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: SpeedModifiedOnWield
    walkModifier: 0.95
    sprintModifier: 0.95

# Rifles / Shotguns
- type: entity
  id: NFBaseWeaponEncumbranceRifle
  abstract: true
  components:
  - type: Item
    size: Large
    shape:
    - 0,0,4,2
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: SpeedModifiedOnWield
    walkModifier: 0.9
    sprintModifier: 0.9

# Assault Rifles
- type: entity
  id: NFBaseWeaponEncumbranceRifleAssault
  abstract: true
  components:
  - type: Item
    size: Large
    shape:
    - 0,0,3,2
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: SpeedModifiedOnWield
    walkModifier: 0.925
    sprintModifier: 0.925

# Launchers
- type: entity
  id: NFBaseWeaponEncumbranceLauncher
  abstract: true
  components:
  - type: Item
    size: Huge
    shape:
    - 0,0,4,3
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: SpeedModifiedOnWield
    walkModifier: 0.65
    sprintModifier: 0.65

# Sniper Rifles / LMGs
- type: entity
  id: NFBaseWeaponEncumbranceSniper
  abstract: true
  components:
  - type: Item
    size: Huge
    #shape:
    #- 0,0,4,3
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: SpeedModifiedOnWield
    walkModifier: 0.65
    sprintModifier: 0.65

- type: entity
  id: NFBaseWeaponEncumbranceCrossbow
  abstract: true
  components:
  - type: Item
    size: Large
    shape:
    - 0,0,3,1
    - 1,1,2,3
    storedRotation: -45
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - suitStorage

- type: entity
  id: NFBaseWeaponEncumbranceCrossbowHand
  abstract: true
  components:
  - type: Item
    size: Normal
    shape:
    - 0,0,2,0
    - 1,1,1,1
    storedRotation: -45
  - type: Clothing
    quickEquip: false
    slots:
    - Back
    - Belt
    - suitStorage

#region Melee attacks
- type: entity
  abstract: true
  id: NFBaseGunMeleeAttackLow
  components:
  - type: AltFireMelee
    attackType: Heavy # Swing
  - type: MeleeWeapon
    attackRate: 1.1
    damage:
      types:
        Blunt: 6
        Structural: 4
    angle: 30
    wideAnimationRotation: 90
    animation: WeaponArcThrust
    soundHit:
      collection: MetalThud

- type: entity
  abstract: true
  parent: NFBaseGunMeleeAttackLow
  id: NFBaseGunMeleeAttackMedium
  components:
  - type: AltFireMelee
    attackType: Heavy # Swing
  - type: MeleeWeapon
    attackRate: 1
    damage:
      types:
        Blunt: 6
        Structural: 4
    angle: 30
    wideAnimationRotation: 90
    animation: WeaponArcThrust
    soundHit:
      collection: MetalThud
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 2
        Structural: 4

- type: entity
  abstract: true
  parent: NFBaseGunMeleeAttackMedium
  id: NFBaseGunMeleeAttackHigh
  components:
  - type: AltFireMelee
    attackType: Heavy # Swing
  - type: MeleeWeapon
    attackRate: 0.95
    damage:
      types:
        Blunt: 8
        Structural: 6
    angle: 30
    wideAnimationRotation: 90
    animation: WeaponArcThrust
    soundHit:
      collection: MetalThud
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 4
        Structural: 4

# melee attack for weapons with bayonets
- type: entity
  abstract: true
  parent: NFBaseGunMeleeAttackHigh
  id: NFBaseGunMeleeAttackBayonet
  components:
  - type: AltFireMelee
    attackType: Light # Stab
  - type: MeleeRequiresWield
  - type: MeleeWeapon
    attackRate: .85
    damage:
      types:
       Slash: 12
       Piercing: 3
    angle: 0
    wideAnimationRotation: -135
    animation: WeaponArcThrust
    soundHit:
      path: /Audio/Weapons/bladeslice.ogg
  - type: DisarmMalus
    malus: 0.225

# melee attack for toy guns
- type: entity
  abstract: true
  parent: NFBaseGunMeleeAttackLow
  id: NFBaseGunMeleeAttackToy
  components:
  - type: AltFireMelee
    attackType: Light
  - type: MeleeWeapon
    attackRate: 1
    damage:
      types:
        Blunt: 0
    angle: 0
    wideAnimationRotation: -135
    animation: WeaponArcThrust
    soundHit:
      collection: MetalThud
