Give throwing a cooldown (#23311)

This commit is contained in:
Nemanja
2023-12-31 22:24:37 -05:00
committed by GitHub
parent e76d8390bd
commit ad5f7a5c76
2 changed files with 25 additions and 1 deletions

View File

@@ -57,6 +57,18 @@ public sealed partial class HandsComponent : Component
/// Used by the client.
/// </summary>
public readonly Dictionary<HandLocation, HashSet<string>> RevealedLayers = new();
/// <summary>
/// The time at which throws will be allowed again.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextThrowTime;
/// <summary>
/// The minimum time inbetween throws.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan ThrowCooldown = TimeSpan.FromSeconds(0.5f);
}
[Serializable, NetSerializable]