diff --git a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs index 9b774be163..c9251000a3 100644 --- a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs +++ b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs @@ -144,11 +144,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 059e8eb127..f2c7703970 100644 --- a/Content.Server/Objectives/ObjectivesSystem.cs +++ b/Content.Server/Objectives/ObjectivesSystem.cs @@ -140,12 +140,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 e07421b365..8ee6c05e0c 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 b2a73a6d70..9d81c62ab3 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: mindRoles: diff --git a/Resources/Prototypes/Objectives/ninja.yml b/Resources/Prototypes/Objectives/ninja.yml index 8d63f00707..5118e89e26 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: mindRoles: diff --git a/Resources/Prototypes/Objectives/thief.yml b/Resources/Prototypes/Objectives/thief.yml index ecd7123b86..f36a322e60 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: mindRoles: diff --git a/Resources/Prototypes/Objectives/traitor.yml b/Resources/Prototypes/Objectives/traitor.yml index ae82f36561..9645645d56 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: mindRoles: