Remove AlertType and AlertCategory (#27933)

This commit is contained in:
Nemanja
2024-05-23 22:43:04 -04:00
committed by GitHub
parent 594a898260
commit 8a95cb186c
69 changed files with 483 additions and 386 deletions

View File

@@ -17,6 +17,9 @@ namespace Content.Shared.Gravity
[Dependency] private readonly AlertsSystem _alerts = default!;
[Dependency] private readonly InventorySystem _inventory = default!;
[ValidatePrototypeId<AlertPrototype>]
public const string WeightlessAlert = "Weightless";
public bool IsWeightless(EntityUid uid, PhysicsComponent? body = null, TransformComponent? xform = null)
{
Resolve(uid, ref body, false);
@@ -93,11 +96,11 @@ namespace Content.Shared.Gravity
if (!ev.HasGravity)
{
_alerts.ShowAlert(uid, AlertType.Weightless);
_alerts.ShowAlert(uid, WeightlessAlert);
}
else
{
_alerts.ClearAlert(uid, AlertType.Weightless);
_alerts.ClearAlert(uid, WeightlessAlert);
}
}
}
@@ -106,11 +109,11 @@ namespace Content.Shared.Gravity
{
if (IsWeightless(ev.Euid))
{
_alerts.ShowAlert(ev.Euid, AlertType.Weightless);
_alerts.ShowAlert(ev.Euid, WeightlessAlert);
}
else
{
_alerts.ClearAlert(ev.Euid, AlertType.Weightless);
_alerts.ClearAlert(ev.Euid, WeightlessAlert);
}
}
@@ -118,11 +121,11 @@ namespace Content.Shared.Gravity
{
if (IsWeightless(uid))
{
_alerts.ShowAlert(uid, AlertType.Weightless);
_alerts.ShowAlert(uid, WeightlessAlert);
}
else
{
_alerts.ClearAlert(uid, AlertType.Weightless);
_alerts.ClearAlert(uid, WeightlessAlert);
}
}