Alerts Cleanup and API (#39544)
* alert cleanup and API * I expect update loops to be at the top. * Address review * Address review x 2 * Merg my PR * Fix * Update Content.Shared/Alert/AlertsSystem.cs webedit Co-authored-by: Perry Fraser <perryprog@users.noreply.github.com> * FIX THAT TEST FAIL!!!! * Me when I forget to actually give you alerts * Hammedborgar --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: Perry Fraser <perryprog@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5e0e5e045a
commit
d488ca96b2
@@ -158,12 +158,12 @@ public abstract class SharedInternalsSystem : EntitySystem
|
||||
|
||||
private void OnInternalsStartup(Entity<InternalsComponent> ent, ref ComponentStartup args)
|
||||
{
|
||||
_alerts.ShowAlert(ent, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
_alerts.ShowAlert(ent.Owner, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
}
|
||||
|
||||
private void OnInternalsShutdown(Entity<InternalsComponent> ent, ref ComponentShutdown args)
|
||||
{
|
||||
_alerts.ClearAlert(ent, ent.Comp.InternalsAlert);
|
||||
_alerts.ClearAlert(ent.Owner, ent.Comp.InternalsAlert);
|
||||
}
|
||||
|
||||
public void ConnectBreathTool(Entity<InternalsComponent> ent, EntityUid toolEntity)
|
||||
@@ -178,7 +178,7 @@ public abstract class SharedInternalsSystem : EntitySystem
|
||||
}
|
||||
|
||||
Dirty(ent);
|
||||
_alerts.ShowAlert(ent, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
_alerts.ShowAlert(ent.Owner, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
}
|
||||
|
||||
public void DisconnectBreathTool(Entity<InternalsComponent> ent, EntityUid toolEntity, bool forced = false)
|
||||
@@ -199,7 +199,7 @@ public abstract class SharedInternalsSystem : EntitySystem
|
||||
DisconnectTank(ent, forced: forced);
|
||||
}
|
||||
|
||||
_alerts.ShowAlert(ent, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
_alerts.ShowAlert(ent.Owner, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
}
|
||||
|
||||
public void DisconnectTank(Entity<InternalsComponent> ent, bool forced = false)
|
||||
@@ -222,7 +222,7 @@ public abstract class SharedInternalsSystem : EntitySystem
|
||||
|
||||
ent.Comp.GasTankEntity = tankEntity;
|
||||
Dirty(ent);
|
||||
_alerts.ShowAlert(ent, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
_alerts.ShowAlert(ent.Owner, ent.Comp.InternalsAlert, GetSeverity(ent));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user