Changes to "Burst" firemode; Drozd, WT550 and C20-r (#31292)

* Initial commit

* Change burst fire variable to be a set value rather than a multiplier
This commit is contained in:
SlamBamActionman
2024-11-06 15:39:16 +01:00
committed by GitHub
parent e72d63e8a9
commit b15d5a7f27
5 changed files with 104 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Shared.Weapons.Ranged.Events;
using Content.Shared.Weapons.Ranged.Systems;
using Robust.Shared.Audio;
@@ -156,6 +157,30 @@ public sealed partial class GunComponent : Component
[AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public int ShotsPerBurstModified = 3;
/// <summary>
/// How long time must pass between burstfire shots.
/// </summary>
[DataField, AutoNetworkedField]
public float BurstCooldown = 0.25f;
/// <summary>
/// The fire rate of the weapon in burst fire mode.
/// </summary>
[DataField, AutoNetworkedField]
public float BurstFireRate = 8f;
/// <summary>
/// Whether the burst fire mode has been activated.
/// </summary>
[AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public bool BurstActivated = false;
/// <summary>
/// The burst fire bullet count.
/// </summary>
[AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public int BurstShotsCount = 0;
/// <summary>
/// Used for tracking semi-auto / burst
/// </summary>
@@ -232,6 +257,12 @@ public sealed partial class GunComponent : Component
/// </summary>
[DataField]
public bool ClumsyProof = false;
/// <summary>
/// Firing direction for an item not being held (e.g. shuttle cannons, thrown guns still firing).
/// </summary>
[DataField]
public Vector2 DefaultDirection = new Vector2(0, -1);
}
[Flags]