Fixes alert category being the same but alert type changing to one without severity

Also adds alert type to the exceptions in AlertPrototype
This commit is contained in:
Vera Aguilera Puerto
2021-01-02 20:51:02 +01:00
parent 85add420b0
commit 74fed841a3
2 changed files with 8 additions and 5 deletions

View File

@@ -93,6 +93,9 @@ namespace Content.Shared.GameObjects.Components.Mobs
return;
}
// In the case we're changing the alert type but not the category, we need to remove it first.
_alerts.Remove(alert.AlertKey);
_alerts[alert.AlertKey] = new AlertState
{Cooldown = cooldown, Severity = severity};