]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
rolebriefingcomponent bugfix (#39261)
authorxsainteer <156868231+xsainteer@users.noreply.github.com>
Mon, 28 Jul 2025 12:50:49 +0000 (18:50 +0600)
committerGitHub <noreply@github.com>
Mon, 28 Jul 2025 12:50:49 +0000 (14:50 +0200)
2 line bugfix

Content.Server/GameTicking/Rules/TraitorRuleSystem.cs

index 2d96cae861fa6927aae824b6300c9f3b31dd98bd..0a2882aa3c24bda72af49233031e7cbacb047bcb 100644 (file)
@@ -125,8 +125,8 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
         if (traitorRole is not null)
         {
             Log.Debug($"MakeTraitor {ToPrettyString(traitor)} - Add traitor briefing components");
-            AddComp<RoleBriefingComponent>(traitorRole.Value.Owner);
-            Comp<RoleBriefingComponent>(traitorRole.Value.Owner).Briefing = briefing;
+            EnsureComp<RoleBriefingComponent>(traitorRole.Value.Owner, out var briefingComp);
+            briefingComp.Briefing = briefing;
         }
         else
         {