ECSatize AlertsSystem (#5559)

This commit is contained in:
Acruid
2022-01-05 00:19:23 -08:00
committed by GitHub
parent 36d4de5e61
commit 5b1cd2dd96
59 changed files with 1069 additions and 1038 deletions

View File

@@ -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);
}
}