Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -3,7 +3,6 @@ using Content.Client.Message;
|
||||
using Content.Shared.Points;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Client.Points;
|
||||
|
||||
@@ -17,17 +16,12 @@ public sealed class PointSystem : SharedPointSystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<PointManagerComponent, ComponentHandleState>(OnHandleState);
|
||||
SubscribeLocalEvent<PointManagerComponent, AfterAutoHandleStateEvent>(OnHandleState);
|
||||
SubscribeLocalEvent<CharacterInfoSystem.GetCharacterInfoControlsEvent>(OnGetCharacterInfoControls);
|
||||
}
|
||||
|
||||
private void OnHandleState(EntityUid uid, PointManagerComponent component, ref ComponentHandleState args)
|
||||
private void OnHandleState(EntityUid uid, PointManagerComponent component, ref AfterAutoHandleStateEvent args)
|
||||
{
|
||||
if (args.Current is not PointManagerComponentState state)
|
||||
return;
|
||||
|
||||
component.Points = new(state.Points);
|
||||
component.Scoreboard = state.Scoreboard;
|
||||
_characterInfo.RequestCharacterInfo();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user