2022-07-06 07:46:35 -04:00
|
|
|
using Content.Shared.Clothing;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using static Content.Shared.Clothing.MagbootsComponent;
|
2021-11-07 22:17:35 -07:00
|
|
|
|
2022-07-06 07:46:35 -04:00
|
|
|
namespace Content.Client.Clothing;
|
|
|
|
|
|
|
|
|
|
public sealed class MagbootsSystem : SharedMagbootsSystem
|
2021-11-07 22:17:35 -07:00
|
|
|
{
|
2022-07-06 07:46:35 -04:00
|
|
|
public override void Initialize()
|
2021-11-07 22:17:35 -07:00
|
|
|
{
|
2022-07-06 07:46:35 -04:00
|
|
|
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);
|
2021-11-07 22:17:35 -07:00
|
|
|
}
|
|
|
|
|
}
|
2022-07-06 07:46:35 -04:00
|
|
|
|