Vixen
c7401864
csharp
public sealed class WeaponTemplate

A weapon with its names resolved.

Read the guide page for this →

Fields and properties (12)

  • public WeaponDefinition Definition

    What it was compiled from.

  • public DefId Id

    Its id.

  • public WeaponKind Kind

    How its shot reaches what it hits.

  • public GameplayTag School

    What kind of damage it does.

  • public ReadOnlySpan<GameplayTag> Tags

    What this weapon is.

  • public ReadOnlySpan<ShotDirection> RecoilPattern

    Its recoil pattern, one step per shot. Empty is no recoil.

  • public int Pellets

    How many pellets one shot fires, never below one.

  • public float FireInterval

    How long between shots, in seconds.

  • public int Magazine

    How many rounds a magazine holds, never below one.

  • public float Range

    How far it reaches, in metres.

  • public float ReloadTime

    How long a reload takes, in seconds.

  • public int MaximumPenetrations

    How many things one shot may pass through.

Methods (3)

  • public float DamageAt(float distance)

    What one pellet is worth at a distance, before the damage pipeline.

  • public float DamageAfter(float distance, int penetrated)

    What a pellet is worth after passing through things.

  • public static ShotDirection Deviate(uint shot, int pellet, float spread)

    Where one pellet of one shot goes.

Used by (7)

  • HitClaimValidatorVixen.Gameplay.Shooting
  • HitClaimValidatorTestsVixen.Gameplay.Shooting.Tests
  • RewindBudgetTestsVixen.Gameplay.Shooting.Tests
  • SpreadTestsVixen.Gameplay.Shooting.Tests
  • WeaponLibraryVixen.Gameplay.Shooting
  • WeaponLibraryTestsVixen.Gameplay.Shooting.Tests
  • WeaponStateVixen.Gameplay.Shooting