Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user