Flash overlay rework and bugfixes (#27369)

This commit is contained in:
slarticodefast
2024-06-02 06:17:53 +02:00
committed by GitHub
parent f5bc921bdd
commit 1283989346
18 changed files with 187 additions and 208 deletions

View File

@@ -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";
}
}