Files
tbd-station-14/Content.Shared/Flash/Components/ActiveFlashComponent.cs
slarticodefast b83d00b792 Predict Flashes (#37640)
Co-authored-by: ScarKy0 <scarky0@onet.eu>
2025-06-23 13:32:56 +02:00

25 lines
970 B
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Flash.Components;
/// <summary>
/// Marks an entity with the <see cref="FlashComponent"/> as currently flashing.
/// Only used for an Update loop for resetting the visuals.
/// </summary>
/// <remarks>
/// TODO: Replace this with something like sprite flick once that exists to get rid of the update loop.
/// </remarks>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
[Access(typeof(SharedFlashSystem))]
public sealed partial class ActiveFlashComponent : Component
{
/// <summary>
/// Time at which this flash will be considered no longer active.
/// At this time this component will be removed.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan ActiveUntil = TimeSpan.Zero;
}