using System.Linq;
using System.Text;
using Content.Server.Objectives.Commands;
+using Content.Shared.CCVar;
using Content.Shared.Prototypes;
using Content.Shared.Roles.Jobs;
using Robust.Server.Player;
+using Robust.Shared.Configuration;
using Robust.Shared.Utility;
namespace Content.Server.Objectives;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly EmergencyShuttleSystem _emergencyShuttle = default!;
[Dependency] private readonly SharedJobSystem _job = default!;
+ [Dependency] private readonly IConfigurationManager _cfg = default!;
private IEnumerable<string>? _objectives;
+ private bool _showGreentext;
+
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoundEndTextAppendEvent>(OnRoundEndText);
+ Subs.CVar(_cfg, CCVars.GameShowGreentext, value => _showGreentext = value, true);
+
_prototypeManager.PrototypesReloaded += CreateCompletions;
}
totalObjectives++;
agentSummary.Append("- ");
- if (progress > 0.99f)
+ if (!_showGreentext)
+ {
+ agentSummary.AppendLine(objectiveTitle);
+ }
+ else if (progress > 0.99f)
{
agentSummary.AppendLine(Loc.GetString(
"objectives-objective-success",
public static readonly CVarDef<bool>
GameLobbyEnableWin = CVarDef.Create("game.enablewin", true, CVar.ARCHIVE);
+ /// <summary>
+ /// Controls if round-end window shows whether the objective was completed or not.
+ /// </summary>
+ public static readonly CVarDef<bool>
+ GameShowGreentext = CVarDef.Create("game.showgreentext", true, CVar.ARCHIVE | CVar.SERVERONLY);
+
/// <summary>
/// Controls the maximum number of character slots a player is allowed to have.
/// </summary>