diff --git a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs index 17d9912f4b..d6195aaa54 100644 --- a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs @@ -58,6 +58,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem(OnCommandMobStateChanged); SubscribeLocalEvent(OnHeadRevMobStateChanged); SubscribeLocalEvent(OnRoundEndText); + SubscribeLocalEvent(OnGetBriefing); SubscribeLocalEvent(OnPostFlash); } @@ -118,6 +119,15 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem(uid, out var mind) || mind.OwnedEntity == null) + return; + + var head = HasComp(mind.OwnedEntity); + args.Append(Loc.GetString(head ? "head-rev-briefing" : "rev-briefing")); + } + private void OnStartAttempt(RoundStartAttemptEvent ev) { var query = AllEntityQuery(); diff --git a/Content.Server/Roles/RoleBriefingSystem.cs b/Content.Server/Roles/RoleBriefingSystem.cs index 27cfdc1cad..c05366e150 100644 --- a/Content.Server/Roles/RoleBriefingSystem.cs +++ b/Content.Server/Roles/RoleBriefingSystem.cs @@ -11,15 +11,6 @@ public sealed class RoleBriefingSystem : EntitySystem private void OnGetBriefing(EntityUid uid, RoleBriefingComponent comp, ref GetBriefingEvent args) { - if (args.Briefing == null) - { - // no previous briefing so just set it - args.Briefing = comp.Briefing; - } - else - { - // there is a previous briefing so append to it - args.Briefing += "\n" + comp.Briefing; - } + args.Append(comp.Briefing); } } diff --git a/Content.Server/Roles/RoleSystem.cs b/Content.Server/Roles/RoleSystem.cs index 8e20708069..6ac0e24540 100644 --- a/Content.Server/Roles/RoleSystem.cs +++ b/Content.Server/Roles/RoleSystem.cs @@ -35,4 +35,28 @@ public sealed class RoleSystem : SharedRoleSystem /// Handlers can either replace or append to the briefing, whichever is more appropriate. /// [ByRefEvent] -public record struct GetBriefingEvent(string? Briefing = null); +public sealed class GetBriefingEvent +{ + public string? Briefing; + + public GetBriefingEvent(string? briefing = null) + { + Briefing = briefing; + } + + /// + /// If there is no briefing, sets it to the string. + /// If there is a briefing, adds a new line to separate it from the appended string. + /// + public void Append(string text) + { + if (Briefing == null) + { + Briefing = text; + } + else + { + Briefing += "\n" + text; + } + } +} diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl index 2ef3e11ee8..2d9415c92a 100644 --- a/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl +++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl @@ -10,6 +10,10 @@ head-rev-role-greeting = Beware, this won't work on Security, Command, or those wearing sunglasses. Viva la revolución! +head-rev-briefing = + Use flashes to convert people to your cause. + Kill all heads to take over the station. + head-rev-initial-name = [color=#5e9cff]{$name}[/color] was one of the Head Revolutionaries. head-rev-initial-name-user = [color=#5e9cff]{$name}[/color] ([color=gray]{$username}[/color]) was one of the Head Revolutionaries. @@ -33,6 +37,8 @@ rev-role-greeting = Eliminate all of the command staff. Viva la revolución! +rev-briefing = Help your head revolutionaries kill every head to take over the station. + ## General rev-title = Revolutionaries