ECSatize AlertsSystem (#5559)
This commit is contained in:
@@ -25,6 +25,7 @@ namespace Content.Shared.Pulling
|
||||
public abstract partial class SharedPullingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedPullingStateManagementSystem _pullSm = default!;
|
||||
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
||||
|
||||
/// <summary>
|
||||
/// A mapping of pullers to the entity that they are pulling.
|
||||
@@ -105,9 +106,8 @@ namespace Content.Shared.Pulling
|
||||
{
|
||||
if (args.Pulled.Owner != uid)
|
||||
return;
|
||||
|
||||
if (EntityManager.TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
||||
alerts.ShowAlert(AlertType.Pulled);
|
||||
|
||||
_alertsSystem.ShowAlert(component.Owner, AlertType.Pulled);
|
||||
}
|
||||
|
||||
private void PullableHandlePullStopped(EntityUid uid, SharedPullableComponent component, PullStoppedMessage args)
|
||||
@@ -115,8 +115,7 @@ namespace Content.Shared.Pulling
|
||||
if (args.Pulled.Owner != uid)
|
||||
return;
|
||||
|
||||
if (EntityManager.TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
||||
alerts.ClearAlert(AlertType.Pulled);
|
||||
_alertsSystem.ClearAlert(component.Owner, AlertType.Pulled);
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
|
||||
Reference in New Issue
Block a user