From: FN <37689533+FireNameFN@users.noreply.github.com> Date: Fri, 8 Nov 2024 02:59:05 +0000 (+0700) Subject: Fix cursed mask bug (#33014) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=012855475e38d1a05df6263f356e0d0805aa7237;p=space-station-14.git Fix cursed mask bug (#33014) * One line fix * Removed redundant using * Allocation improvement --- diff --git a/Content.Server/Clothing/Systems/CursedMaskSystem.cs b/Content.Server/Clothing/Systems/CursedMaskSystem.cs index 825e85e2c6..86d4e801a8 100644 --- a/Content.Server/Clothing/Systems/CursedMaskSystem.cs +++ b/Content.Server/Clothing/Systems/CursedMaskSystem.cs @@ -51,7 +51,8 @@ public sealed class CursedMaskSystem : SharedCursedMaskSystem } var npcFaction = EnsureComp(wearer); - ent.Comp.OldFactions = npcFaction.Factions; + ent.Comp.OldFactions.Clear(); + ent.Comp.OldFactions.UnionWith(npcFaction.Factions); _npcFaction.ClearFactions((wearer, npcFaction), false); _npcFaction.AddFaction((wearer, npcFaction), ent.Comp.CursedMaskFaction);