using System.Linq;
using Content.Client.CharacterInfo;
using Content.Client.Gameplay;
+using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Client.UserInterface.Systems.Character.Controls;
using Content.Client.UserInterface.Systems.Character.Windows;
using Content.Client.UserInterface.Systems.Objectives.Controls;
using Content.Shared.Input;
+using Content.Shared.Objectives.Systems;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Player;
Modulate = Color.Gray
};
- objectiveControl.AddChild(new Label
+
+ var objectiveText = new FormattedMessage();
+ objectiveText.TryAddMarkup(groupId, out _);
+
+ var objectiveLabel = new RichTextLabel
{
- Text = groupId,
- Modulate = Color.LightSkyBlue
- });
+ StyleClasses = {StyleNano.StyleClassTooltipActionTitle}
+ };
+ objectiveLabel.SetMessage(objectiveText);
+
+ objectiveControl.AddChild(objectiveLabel);
foreach (var condition in conditions)
{
continue;
// group objectives by their issuer
- var issuer = Comp<ObjectiveComponent>(objective).Issuer;
+ var issuer = Comp<ObjectiveComponent>(objective).LocIssuer;
if (!objectives.ContainsKey(issuer))
objectives[issuer] = new List<ObjectiveInfo>();
objectives[issuer].Add(info.Value);
var agentSummary = new StringBuilder();
agentSummary.AppendLine(Loc.GetString("objectives-with-objectives", ("custody", custody), ("title", title), ("agent", agent)));
- foreach (var objectiveGroup in objectives.GroupBy(o => Comp<ObjectiveComponent>(o).Issuer))
+ foreach (var objectiveGroup in objectives.GroupBy(o => Comp<ObjectiveComponent>(o).LocIssuer))
{
//TO DO:
//check for the right group here. Getting the target issuer is easy: objectiveGroup.Key
//It should be compared to the type of the group's issuer.
- agentSummary.AppendLine(Loc.GetString($"objective-issuer-{objectiveGroup.Key}"));
+ agentSummary.AppendLine(objectiveGroup.Key);
foreach (var objective in objectiveGroup)
{
/// <summary>
/// Organisation that issued this objective, used for grouping and as a header above common objectives.
/// </summary>
- [DataField(required: true)]
- public string Issuer = string.Empty;
+ [DataField("issuer", required: true)]
+ private LocId Issuer { get; set; }
+
+ [ViewVariables(VVAccess.ReadOnly)]
+ public string LocIssuer => Loc.GetString(Issuer);
/// <summary>
/// Unique objectives can only have 1 per prototype id.
- type: Objective
# difficulty isn't used at all since objective are fixed
difficulty: 1.5
- issuer: dragon
+ issuer: objective-issuer-dragon
- type: RoleRequirement
roles:
components:
- type: Objective
# difficulty isn't used since all objectives are picked
difficulty: 1.5
- issuer: spiderclan
+ issuer: objective-issuer-spiderclan
- type: RoleRequirement
roles:
components:
id: BaseThiefObjective
components:
- type: Objective
- issuer: thief
+ issuer: objective-issuer-thief
- type: RoleRequirement
roles:
components:
id: BaseTraitorObjective
components:
- type: Objective
- issuer: syndicate
+ issuer: objective-issuer-syndicate
- type: RoleRequirement
roles:
components: