2021-09-09 16:20:41 +02:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Flash
|
|
|
|
|
{
|
|
|
|
|
public abstract class SharedFlashSystem : EntitySystem
|
|
|
|
|
{
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
2022-12-24 23:28:21 -05:00
|
|
|
SubscribeLocalEvent<FlashableComponent, ComponentGetState>(OnFlashableGetState);
|
2021-11-30 15:20:38 +01:00
|
|
|
}
|
2021-09-09 16:20:41 +02:00
|
|
|
|
2022-12-24 23:28:21 -05:00
|
|
|
private static void OnFlashableGetState(EntityUid uid, FlashableComponent component, ref ComponentGetState args)
|
2021-11-30 15:20:38 +01:00
|
|
|
{
|
2021-09-09 16:20:41 +02:00
|
|
|
args.State = new FlashableComponentState(component.Duration, component.LastFlash);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|