Show / Hide Table of Contents

Class GunComponent

Inheritance
System.Object
GunComponent
Namespace: Content.Shared.Weapons.Ranged.Components
Assembly: Content.Shared.dll
Syntax
public class GunComponent : Component

Fields

| Improve this Doc View Source

AngleDecay

How much the CurrentAngle decreases per second.

Declaration
public Angle AngleDecay
Field Value
Type Description
Angle
| Improve this Doc View Source

AngleIncrease

How much the spread increases every time the gun fires.

Declaration
public Angle AngleIncrease
Field Value
Type Description
Angle
| Improve this Doc View Source

AvailableModes

What firemodes can be selected.

Declaration
public SelectiveFire AvailableModes
Field Value
Type Description
SelectiveFire
| Improve this Doc View Source

CameraRecoilScalar

A scalar value applied to the vector governing camera recoil. If 0, there will be no camera recoil.

Declaration
public float CameraRecoilScalar
Field Value
Type Description
System.Single
| Improve this Doc View Source

ClumsyProof

Whether or not someone with the clumsy trait can shoot this

Declaration
public bool ClumsyProof
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

CurrentAngle

What the current spread is for shooting. This gets changed every time the gun fires.

Declaration
public Angle CurrentAngle
Field Value
Type Description
Angle
| Improve this Doc View Source

FireRate

How many times it shoots per second.

Declaration
public float FireRate
Field Value
Type Description
System.Single
| Improve this Doc View Source

LastFire

Last time the gun fired. Used for recoil purposes.

Declaration
public TimeSpan LastFire
Field Value
Type Description
TimeSpan
| Improve this Doc View Source

MaxAngle

The maximum angle allowed for CurrentAngle

Declaration
public Angle MaxAngle
Field Value
Type Description
Angle
| Improve this Doc View Source

MinAngle

The minimum angle allowed for CurrentAngle

Declaration
public Angle MinAngle
Field Value
Type Description
Angle
| Improve this Doc View Source

NextFire

When the gun is next available to be shot. Can be set multiple times in a single tick due to guns firing faster than a single tick time.

Declaration
public TimeSpan NextFire
Field Value
Type Description
TimeSpan
| Improve this Doc View Source

ProjectileSpeed

How fast the projectile moves.

Declaration
public float ProjectileSpeed
Field Value
Type Description
System.Single
| Improve this Doc View Source

ResetOnHandSelected

Starts fire cooldown when equipped if true.

Declaration
public bool ResetOnHandSelected
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

SelectedMode

What firemode is currently selected.

Declaration
public SelectiveFire SelectedMode
Field Value
Type Description
SelectiveFire
| Improve this Doc View Source

ShootCoordinates

Where the gun is being requested to shoot.

Declaration
public EntityCoordinates? ShootCoordinates
Field Value
Type Description
System.Nullable<Robust.Shared.Map.EntityCoordinates>
| Improve this Doc View Source

ShotCounter

Used for tracking semi-auto / burst

Declaration
public int ShotCounter
Field Value
Type Description
System.Int32
| Improve this Doc View Source

ShowExamineText

Whether or not information about the gun will be shown on examine.

Declaration
public bool ShowExamineText
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

SoundEmpty

Declaration
public SoundSpecifier SoundEmpty
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

SoundGunshot

Declaration
public SoundSpecifier SoundGunshot
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

SoundModeToggle

Sound played when toggling the SelectedMode for this gun.

Declaration
public SoundSpecifier SoundModeToggle
Field Value
Type Description
Robust.Shared.Audio.SoundSpecifier
| Improve this Doc View Source

UseKey

Whether this gun is shot via the use key or the alt-use key.

Declaration
public bool UseKey
Field Value
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾