Fix UseDelay issues (#27336)
* Fix UseDelay issues - Fix it not predicting properly by deep-copying the classes (realistically they should be structs). - Fix the `z` path not applying UseDelay similarly to the `e` path. * click
This commit is contained in:
@@ -8,11 +8,11 @@ namespace Content.Shared.Timing;
|
||||
/// Can support additional, separate cooldown timers on the object by passing a unique ID with the system methods.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent, AutoGenerateComponentState]
|
||||
[NetworkedComponent]
|
||||
[Access(typeof(UseDelaySystem))]
|
||||
public sealed partial class UseDelayComponent : Component
|
||||
{
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField]
|
||||
public Dictionary<string, UseDelayInfo> Delays = [];
|
||||
|
||||
/// <summary>
|
||||
@@ -27,6 +27,12 @@ public sealed partial class UseDelayComponent : Component
|
||||
public TimeSpan Delay = TimeSpan.FromSeconds(1);
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class UseDelayComponentState : IComponentState
|
||||
{
|
||||
public Dictionary<string, UseDelayInfo> Delays = new();
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
[DataDefinition]
|
||||
public sealed partial class UseDelayInfo
|
||||
|
||||
Reference in New Issue
Block a user