Flash overlay rework and bugfixes (#27369)
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Content.Shared.StatusEffect;
|
||||
|
||||
namespace Content.Shared.Flash
|
||||
{
|
||||
public abstract class SharedFlashSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<FlashableComponent, ComponentGetState>(OnFlashableGetState);
|
||||
}
|
||||
|
||||
private static void OnFlashableGetState(EntityUid uid, FlashableComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new FlashableComponentState(component.Duration, component.LastFlash);
|
||||
}
|
||||
[ValidatePrototypeId<StatusEffectPrototype>]
|
||||
public const string FlashedKey = "Flashed";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user