diff --git a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs index 88edb6a4f1..1e4d2f2765 100644 --- a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs +++ b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs @@ -1,11 +1,13 @@ 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; @@ -121,11 +123,17 @@ public sealed class CharacterUIController : UIController, IOnStateEntered(objective).Issuer; + var issuer = Comp(objective).LocIssuer; if (!objectives.ContainsKey(issuer)) objectives[issuer] = new List(); objectives[issuer].Add(info.Value); diff --git a/Content.Server/Objectives/ObjectivesSystem.cs b/Content.Server/Objectives/ObjectivesSystem.cs index c9cdf244e6..382cb1ab44 100644 --- a/Content.Server/Objectives/ObjectivesSystem.cs +++ b/Content.Server/Objectives/ObjectivesSystem.cs @@ -129,12 +129,12 @@ public sealed class ObjectivesSystem : SharedObjectivesSystem 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(o).Issuer)) + foreach (var objectiveGroup in objectives.GroupBy(o => Comp(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) { diff --git a/Content.Shared/Objectives/Components/ObjectiveComponent.cs b/Content.Shared/Objectives/Components/ObjectiveComponent.cs index 36d3fa0bde..fb2e6ca0a6 100644 --- a/Content.Shared/Objectives/Components/ObjectiveComponent.cs +++ b/Content.Shared/Objectives/Components/ObjectiveComponent.cs @@ -22,8 +22,11 @@ public sealed partial class ObjectiveComponent : Component /// /// Organisation that issued this objective, used for grouping and as a header above common objectives. /// - [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); /// /// Unique objectives can only have 1 per prototype id. diff --git a/Resources/Prototypes/Objectives/dragon.yml b/Resources/Prototypes/Objectives/dragon.yml index 10ca942cb3..bbdac8faa1 100644 --- a/Resources/Prototypes/Objectives/dragon.yml +++ b/Resources/Prototypes/Objectives/dragon.yml @@ -6,7 +6,7 @@ - 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: diff --git a/Resources/Prototypes/Objectives/ninja.yml b/Resources/Prototypes/Objectives/ninja.yml index 77628a68cf..4d0cf6c17c 100644 --- a/Resources/Prototypes/Objectives/ninja.yml +++ b/Resources/Prototypes/Objectives/ninja.yml @@ -6,7 +6,7 @@ - type: Objective # difficulty isn't used since all objectives are picked difficulty: 1.5 - issuer: spiderclan + issuer: objective-issuer-spiderclan - type: RoleRequirement roles: components: diff --git a/Resources/Prototypes/Objectives/thief.yml b/Resources/Prototypes/Objectives/thief.yml index 8b5307e9a0..cc94ab02b3 100644 --- a/Resources/Prototypes/Objectives/thief.yml +++ b/Resources/Prototypes/Objectives/thief.yml @@ -4,7 +4,7 @@ id: BaseThiefObjective components: - type: Objective - issuer: thief + issuer: objective-issuer-thief - type: RoleRequirement roles: components: diff --git a/Resources/Prototypes/Objectives/traitor.yml b/Resources/Prototypes/Objectives/traitor.yml index ad5f56a443..edf191b420 100644 --- a/Resources/Prototypes/Objectives/traitor.yml +++ b/Resources/Prototypes/Objectives/traitor.yml @@ -4,7 +4,7 @@ id: BaseTraitorObjective components: - type: Objective - issuer: syndicate + issuer: objective-issuer-syndicate - type: RoleRequirement roles: components: