Remove AlertType and AlertCategory (#27933)
This commit is contained in:
@@ -79,8 +79,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
{
|
||||
RemCompDeferred<ActiveStaminaComponent>(uid);
|
||||
}
|
||||
|
||||
SetStaminaAlert(uid);
|
||||
_alerts.ClearAlert(uid, component.StaminaAlert);
|
||||
}
|
||||
|
||||
private void OnStartup(EntityUid uid, StaminaComponent component, ComponentStartup args)
|
||||
@@ -204,13 +203,10 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
private void SetStaminaAlert(EntityUid uid, StaminaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component, false) || component.Deleted)
|
||||
{
|
||||
_alerts.ClearAlert(uid, AlertType.Stamina);
|
||||
return;
|
||||
}
|
||||
|
||||
var severity = ContentHelpers.RoundToLevels(MathF.Max(0f, component.CritThreshold - component.StaminaDamage), component.CritThreshold, 7);
|
||||
_alerts.ShowAlert(uid, AlertType.Stamina, (short) severity);
|
||||
_alerts.ShowAlert(uid, component.StaminaAlert, (short) severity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user