Fixing MobState issues (#13465)

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
Fixes https://github.com/space-wizards/space-station-14/issues/13461
This commit is contained in:
Jezithyr
2023-01-14 01:32:57 -08:00
committed by GitHub
parent cbb37e434b
commit f42bbb226a
4 changed files with 36 additions and 32 deletions

View File

@@ -16,6 +16,12 @@ public abstract class AlertsSystem : EntitySystem
: null;
}
public short GetSeverityRange(AlertType alertType)
{
var minSeverity = _typeToAlert[alertType].MinSeverity;
return (short)MathF.Min(minSeverity,_typeToAlert[alertType].MaxSeverity - minSeverity);
}
public short GetMaxSeverity(AlertType alertType)
{
return _typeToAlert[alertType].MaxSeverity;