ECSatize AlertsSystem (#5559)
This commit is contained in:
@@ -7,12 +7,15 @@ using Content.Shared.Movement.EntitySystems;
|
||||
using Content.Shared.Slippery;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.Clothing
|
||||
{
|
||||
public sealed class MagbootsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -35,16 +38,13 @@ namespace Content.Server.Clothing
|
||||
movedByPressure.Enabled = state;
|
||||
}
|
||||
|
||||
if (TryComp(parent, out ServerAlertsComponent? alerts))
|
||||
if (state)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
alerts.ShowAlert(AlertType.Magboots);
|
||||
}
|
||||
else
|
||||
{
|
||||
alerts.ClearAlert(AlertType.Magboots);
|
||||
}
|
||||
_alertsSystem.ShowAlert(parent, AlertType.Magboots);
|
||||
}
|
||||
else
|
||||
{
|
||||
_alertsSystem.ClearAlert(parent, AlertType.Magboots);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user