Update trivial components to use auto comp states (#20539)

This commit is contained in:
DrSmugleaf
2023-09-28 16:20:29 -07:00
committed by GitHub
parent 14cfe44ece
commit a44fa86b68
158 changed files with 806 additions and 2866 deletions

View File

@@ -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();
}