Cleanup SharedRoleCodewordSystem (#38310)
* cleanup * Update Content.Shared/Roles/RoleCodeword/SharedRoleCodewordSystem.cs Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
This commit is contained in:
@@ -133,11 +133,11 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
||||
Log.Debug($"MakeTraitor {ToPrettyString(traitor)} - did not get traitor briefing");
|
||||
}
|
||||
|
||||
// Send codewords to only the traitor client
|
||||
var color = TraitorCodewordColor; // Fall back to a dark red Syndicate color if a prototype is not found
|
||||
|
||||
RoleCodewordComponent codewordComp = EnsureComp<RoleCodewordComponent>(mindId);
|
||||
_roleCodewordSystem.SetRoleCodewords(codewordComp, "traitor", factionCodewords.ToList(), color);
|
||||
// The mind entity is stored in nullspace with a PVS override for the owner, so only they can see the codewords.
|
||||
var codewordComp = EnsureComp<RoleCodewordComponent>(mindId);
|
||||
_roleCodewordSystem.SetRoleCodewords((mindId, codewordComp), "traitor", factionCodewords.ToList(), color);
|
||||
|
||||
// Change the faction
|
||||
Log.Debug($"MakeTraitor {ToPrettyString(traitor)} - Change faction");
|
||||
|
||||
Reference in New Issue
Block a user