diff --git a/Content.Server/NPC/Systems/FactionSystem.cs b/Content.Server/NPC/Systems/FactionSystem.cs index 241c1c4bdb..a176ed149d 100644 --- a/Content.Server/NPC/Systems/FactionSystem.cs +++ b/Content.Server/NPC/Systems/FactionSystem.cs @@ -36,6 +36,9 @@ namespace Content.Server.NPC.Systems private void OnProtoReload(PrototypesReloadedEventArgs obj) { + if (!obj.ByType.ContainsKey(typeof(FactionPrototype))) + return; + RefreshFactions(); } @@ -49,6 +52,9 @@ namespace Content.Server.NPC.Systems /// private void RefreshFactions(FactionComponent component) { + component.FriendlyFactions.Clear(); + component.HostileFactions.Clear(); + foreach (var faction in component.Factions) { // YAML Linter already yells about this