Some fixes to magboots (#15392)

This commit is contained in:
Menshin
2023-04-22 12:42:36 +02:00
committed by GitHub
parent 035fcaa5b1
commit 8ddef7611b
5 changed files with 25 additions and 61 deletions

View File

@@ -1,27 +1,8 @@
using Content.Shared.Clothing;
using Robust.Shared.GameStates;
using static Content.Shared.Clothing.MagbootsComponent;
namespace Content.Client.Clothing;
public sealed class MagbootsSystem : SharedMagbootsSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MagbootsComponent, ComponentHandleState>(OnHandleState);
}
private void OnHandleState(EntityUid uid, MagbootsComponent component, ref ComponentHandleState args)
{
if (args.Current is not MagbootsComponentState componentState)
return;
if (component.On == componentState.On) return;
component.On = componentState.On;
OnChanged(component);
}
}