Add MindPlaySound to role system (#21460)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -268,21 +268,16 @@ public sealed class TraitorRuleSystem : GameRuleSystem<TraitorRuleComponent>
|
||||
_roleSystem.MindAddRole(mindId, new TraitorRoleComponent
|
||||
{
|
||||
PrototypeId = traitorRule.TraitorPrototypeId
|
||||
});
|
||||
// Assign briefing
|
||||
}, mind);
|
||||
// Assign briefing and greeting sound
|
||||
_roleSystem.MindAddRole(mindId, new RoleBriefingComponent
|
||||
{
|
||||
Briefing = briefing
|
||||
});
|
||||
}, mind);
|
||||
_roleSystem.MindPlaySound(mindId, traitorRule.GreetSoundNotification, mind);
|
||||
SendTraitorBriefing(mindId, traitorRule.Codewords, code);
|
||||
traitorRule.TraitorMinds.Add(mindId);
|
||||
|
||||
if (_mindSystem.TryGetSession(mindId, out var session))
|
||||
{
|
||||
// Notificate player about new role assignment
|
||||
_audioSystem.PlayGlobal(traitorRule.GreetSoundNotification, session);
|
||||
}
|
||||
|
||||
// Change the faction
|
||||
_npcFaction.RemoveFaction(entity, "NanoTrasen", false);
|
||||
_npcFaction.AddFaction(entity, "Syndicate");
|
||||
|
||||
Reference in New Issue
Block a user