2024-02-14 01:12:32 +03:00
|
|
|
using Content.Shared.Physics;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-06-22 05:47:15 +10:00
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Flash
|
2020-06-22 05:47:15 +10:00
|
|
|
{
|
2022-12-24 23:28:21 -05:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class FlashableComponent : Component
|
2020-06-22 05:47:15 +10:00
|
|
|
{
|
2022-12-24 23:28:21 -05:00
|
|
|
public float Duration;
|
|
|
|
|
public TimeSpan LastFlash;
|
2022-09-14 21:40:05 +12:00
|
|
|
|
2024-02-14 01:12:32 +03:00
|
|
|
[DataField]
|
|
|
|
|
public CollisionGroup CollisionGroup = CollisionGroup.Opaque;
|
|
|
|
|
|
2022-09-14 21:40:05 +12:00
|
|
|
public override bool SendOnlyToOwner => true;
|
2020-06-22 05:47:15 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class FlashableComponentState : ComponentState
|
2020-06-22 05:47:15 +10:00
|
|
|
{
|
2021-09-09 16:20:41 +02:00
|
|
|
public float Duration { get; }
|
2020-06-22 05:47:15 +10:00
|
|
|
public TimeSpan Time { get; }
|
|
|
|
|
|
2021-09-09 16:20:41 +02:00
|
|
|
public FlashableComponentState(float duration, TimeSpan time)
|
2020-06-22 05:47:15 +10:00
|
|
|
{
|
|
|
|
|
Duration = duration;
|
|
|
|
|
Time = time;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-04-29 22:20:09 +12:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum FlashVisuals : byte
|
|
|
|
|
{
|
|
|
|
|
BaseLayer,
|
|
|
|
|
LightLayer,
|
|
|
|
|
Burnt,
|
|
|
|
|
Flashing,
|
|
|
|
|
}
|
2020-06-22 05:47:15 +10:00
|
|
|
}
|