Mobstate Refactor (#13389)
Refactors mobstate and moves mob health thresholds to their own component Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
This commit is contained in:
@@ -7,7 +7,6 @@ namespace Content.Shared.Alert;
|
||||
public abstract class AlertsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
private readonly Dictionary<AlertType, AlertPrototype> _typeToAlert = new();
|
||||
|
||||
public IReadOnlyDictionary<AlertKey, AlertState>? GetActiveAlerts(EntityUid euid)
|
||||
@@ -17,6 +16,16 @@ public abstract class AlertsSystem : EntitySystem
|
||||
: null;
|
||||
}
|
||||
|
||||
public short GetMaxSeverity(AlertType alertType)
|
||||
{
|
||||
return _typeToAlert[alertType].MaxSeverity;
|
||||
}
|
||||
|
||||
public short GetMinSeverity(AlertType alertType)
|
||||
{
|
||||
return _typeToAlert[alertType].MinSeverity;
|
||||
}
|
||||
|
||||
public bool IsShowingAlert(EntityUid euid, AlertType alertType)
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(euid, out AlertsComponent? alertsComponent))
|
||||
|
||||
Reference in New Issue
Block a user