Added briefings to character menu & the traitor briefing (codewords) (#5971)
This commit is contained in:
@@ -27,6 +27,7 @@ public class CharacterInfoSystem : EntitySystem
|
||||
|
||||
var conditions = new Dictionary<string, List<ConditionInfo>>();
|
||||
var jobTitle = "No Profession";
|
||||
var briefing = "!!ERROR: No Briefing!!"; //should never show on the UI unless there's a bug
|
||||
if (EntityManager.TryGetComponent(entity, out MindComponent? mindComponent) && mindComponent.Mind != null)
|
||||
{
|
||||
var mind = mindComponent.Mind;
|
||||
@@ -51,9 +52,12 @@ public class CharacterInfoSystem : EntitySystem
|
||||
jobTitle = role.Name;
|
||||
break;
|
||||
}
|
||||
|
||||
// Get briefing
|
||||
briefing = mind.Briefing;
|
||||
}
|
||||
|
||||
RaiseNetworkEvent(new CharacterInfoEvent(entity, jobTitle, conditions),
|
||||
RaiseNetworkEvent(new CharacterInfoEvent(entity, jobTitle, conditions, briefing),
|
||||
Filter.SinglePlayer(args.SenderSession));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +186,9 @@ public class TraitorRuleSystem : GameRuleSystem
|
||||
if (traitor.Mind.TryAddObjective(objective))
|
||||
difficulty += objective.Difficulty;
|
||||
}
|
||||
|
||||
//give traitors their codewords to keep in their character info menu
|
||||
traitor.Mind.Briefing = Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords)));
|
||||
}
|
||||
|
||||
SoundSystem.Play(Filter.Empty().AddWhere(s => ((IPlayerSession)s).Data.ContentData()?.Mind?.HasRole<TraitorRole>() ?? false), _addedSound.GetSound(), AudioParams.Default);
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Content.Server.Mind
|
||||
private readonly ISet<Role> _roles = new HashSet<Role>();
|
||||
|
||||
private readonly List<Objective> _objectives = new();
|
||||
|
||||
public string Briefing = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Creates the new mind.
|
||||
|
||||
Reference in New Issue
Block a user