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

@@ -2,7 +2,6 @@
using Content.Client.Items;
using Content.Shared.Implants;
using Content.Shared.Implants.Components;
using Robust.Shared.GameStates;
namespace Content.Client.Implants;
@@ -12,17 +11,12 @@ public sealed class ImplanterSystem : SharedImplanterSystem
{
base.Initialize();
SubscribeLocalEvent<ImplanterComponent, ComponentHandleState>(OnHandleImplanterState);
SubscribeLocalEvent<ImplanterComponent, AfterAutoHandleStateEvent>(OnHandleImplanterState);
SubscribeLocalEvent<ImplanterComponent, ItemStatusCollectMessage>(OnItemImplanterStatus);
}
private void OnHandleImplanterState(EntityUid uid, ImplanterComponent component, ref ComponentHandleState args)
private void OnHandleImplanterState(EntityUid uid, ImplanterComponent component, ref AfterAutoHandleStateEvent args)
{
if (args.Current is not ImplanterComponentState state)
return;
component.CurrentMode = state.CurrentMode;
component.ImplantOnly = state.ImplantOnly;
component.UiUpdateNeeded = true;
}