more component ref removal + combining server/client comps (#13178)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
27
Content.Shared/Flash/FlashableComponent.cs
Normal file
27
Content.Shared/Flash/FlashableComponent.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Flash
|
||||
{
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class FlashableComponent : Component
|
||||
{
|
||||
public float Duration;
|
||||
public TimeSpan LastFlash;
|
||||
|
||||
public override bool SendOnlyToOwner => true;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class FlashableComponentState : ComponentState
|
||||
{
|
||||
public float Duration { get; }
|
||||
public TimeSpan Time { get; }
|
||||
|
||||
public FlashableComponentState(float duration, TimeSpan time)
|
||||
{
|
||||
Duration = duration;
|
||||
Time = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user