decouple briefing from traitor (#19668)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-08-31 22:29:45 +01:00
committed by GitHub
parent 31282a3fc6
commit 7842f0d055
9 changed files with 70 additions and 14 deletions

View File

@@ -254,11 +254,18 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
var traitorRole = new TraitorRoleComponent
{
PrototypeId = traitorRule.TraitorPrototypeId,
Briefing = briefing
};
// Assign traitor roles
_roleSystem.MindAddRole(mindId, traitorRole);
_roleSystem.MindAddRole(mindId, new TraitorRoleComponent
{
PrototypeId = traitorRule.TraitorPrototypeId
});
// Assign briefing
_roleSystem.MindAddRole(mindId, new RoleBriefingComponent
{
Briefing = briefing
});
SendTraitorBriefing(mindId, traitorRule.Codewords, code);
traitorRule.TraitorMinds.Add(mindId);