Blindness refactor (#15705)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Eye.Blinding;
|
||||
using Content.Shared.Eye.Blinding.Components;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
@@ -22,8 +23,6 @@ public sealed class BlurryVisionSystem : EntitySystem
|
||||
SubscribeLocalEvent<BlurryVisionComponent, PlayerAttachedEvent>(OnPlayerAttached);
|
||||
SubscribeLocalEvent<BlurryVisionComponent, PlayerDetachedEvent>(OnPlayerDetached);
|
||||
|
||||
SubscribeLocalEvent<BlurryVisionComponent, ComponentHandleState>(OnHandleState);
|
||||
|
||||
_overlay = new();
|
||||
}
|
||||
|
||||
@@ -50,12 +49,4 @@ public sealed class BlurryVisionSystem : EntitySystem
|
||||
_overlayMan.RemoveOverlay(_overlay);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnHandleState(EntityUid uid, BlurryVisionComponent component, ref ComponentHandleState args)
|
||||
{
|
||||
if (args.Current is not BlurryVisionComponentState state)
|
||||
return;
|
||||
|
||||
component.Magnitude = state.Magnitude;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user