Some fixes to magboots (#15392)
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Clothing;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using static Content.Shared.Clothing.MagbootsComponent;
|
||||
|
||||
namespace Content.Server.Clothing;
|
||||
|
||||
public sealed class MagbootsSystem : SharedMagbootsSystem
|
||||
{
|
||||
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
||||
[Dependency] private readonly AlertsSystem _alerts = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -21,7 +15,6 @@ public sealed class MagbootsSystem : SharedMagbootsSystem
|
||||
|
||||
SubscribeLocalEvent<MagbootsComponent, GotEquippedEvent>(OnGotEquipped);
|
||||
SubscribeLocalEvent<MagbootsComponent, GotUnequippedEvent>(OnGotUnequipped);
|
||||
SubscribeLocalEvent<MagbootsComponent, ComponentGetState>(OnGetState);
|
||||
}
|
||||
|
||||
protected override void UpdateMagbootEffects(EntityUid parent, EntityUid uid, bool state, MagbootsComponent? component)
|
||||
@@ -37,11 +30,11 @@ public sealed class MagbootsSystem : SharedMagbootsSystem
|
||||
|
||||
if (state)
|
||||
{
|
||||
_alertsSystem.ShowAlert(parent, AlertType.Magboots);
|
||||
_alerts.ShowAlert(parent, AlertType.Magboots);
|
||||
}
|
||||
else
|
||||
{
|
||||
_alertsSystem.ClearAlert(parent, AlertType.Magboots);
|
||||
_alerts.ClearAlert(parent, AlertType.Magboots);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,9 +53,4 @@ public sealed class MagbootsSystem : SharedMagbootsSystem
|
||||
UpdateMagbootEffects(args.Equipee, uid, true, component);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGetState(EntityUid uid, MagbootsComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new MagbootsComponentState(component.On);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user