ECSatize AlertsSystem (#5559)
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Content.Shared.Pulling.Systems
|
||||
{
|
||||
[Dependency] private readonly SharedPullingSystem _pullSystem = default!;
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
|
||||
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -47,8 +48,7 @@ namespace Content.Shared.Pulling.Systems
|
||||
if (args.Puller.Owner != uid)
|
||||
return;
|
||||
|
||||
if (EntityManager.TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
||||
alerts.ShowAlert(AlertType.Pulling);
|
||||
_alertsSystem.ShowAlert(component.Owner, AlertType.Pulling);
|
||||
|
||||
RefreshMovementSpeed(component);
|
||||
}
|
||||
@@ -61,8 +61,8 @@ namespace Content.Shared.Pulling.Systems
|
||||
if (args.Puller.Owner != uid)
|
||||
return;
|
||||
|
||||
if (EntityManager.TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
||||
alerts.ClearAlert(AlertType.Pulling);
|
||||
var euid = component.Owner;
|
||||
_alertsSystem.ClearAlert(euid, AlertType.Pulling);
|
||||
|
||||
RefreshMovementSpeed(component);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user