diff --git a/Content.Server/Mind/Mind.cs b/Content.Server/Mind/Mind.cs index 77a9004ab7..4c45d1549a 100644 --- a/Content.Server/Mind/Mind.cs +++ b/Content.Server/Mind/Mind.cs @@ -35,7 +35,7 @@ namespace Content.Server.Mind private readonly ISet _roles = new HashSet(); private readonly List _objectives = new(); - + public string Briefing = String.Empty; /// @@ -223,6 +223,11 @@ namespace Content.Server.Mind return _roles.Any(role => role.GetType() == t); } + /// + /// Gets the current job + /// + public Job? CurrentJob => _roles.OfType().SingleOrDefault(); + /// /// Adds an objective to this mind. /// diff --git a/Content.Server/Objectives/Conditions/KillPersonCondition.cs b/Content.Server/Objectives/Conditions/KillPersonCondition.cs index 5fe620a2d5..b00b0147ce 100644 --- a/Content.Server/Objectives/Conditions/KillPersonCondition.cs +++ b/Content.Server/Objectives/Conditions/KillPersonCondition.cs @@ -1,4 +1,5 @@ using Content.Server.Objectives.Interfaces; +using Content.Server.Roles; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; @@ -16,16 +17,17 @@ namespace Content.Server.Objectives.Conditions get { var targetName = string.Empty; + var jobName = Target?.CurrentJob?.Name ?? "Unknown"; if (Target == null) - return Loc.GetString("objective-condition-kill-person-title", ("targetName", targetName)); + return Loc.GetString("objective-condition-kill-person-title", ("targetName", targetName), ("job", jobName)); if (Target.CharacterName != null) targetName = Target.CharacterName; else if (Target.OwnedEntity is {Valid: true} owned) targetName = IoCManager.Resolve().GetComponent(owned).EntityName; - return Loc.GetString("objective-condition-kill-person-title", ("targetName", targetName)); + return Loc.GetString("objective-condition-kill-person-title", ("targetName", targetName), ("job", jobName)); } } diff --git a/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs b/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs index f6557afcdf..d78aa053fc 100644 --- a/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs +++ b/Content.Server/Objectives/Conditions/RandomTraitorAliveCondition.cs @@ -9,6 +9,7 @@ using Robust.Shared.Localization; using Robust.Shared.Utility; using Robust.Shared.Serialization.Manager.Attributes; using Content.Server.Traitor; +using Content.Server.Roles; namespace Content.Server.Objectives.Conditions { @@ -38,16 +39,17 @@ namespace Content.Server.Objectives.Conditions get { var targetName = string.Empty; + var jobName = Target?.CurrentJob?.Name ?? "Unknown"; if (Target == null) - return Loc.GetString("objective-condition-other-traitor-alive-title", ("targetName", targetName)); + return Loc.GetString("objective-condition-other-traitor-alive-title", ("targetName", targetName), ("job", jobName)); if (Target.CharacterName != null) targetName = Target.CharacterName; else if (Target.OwnedEntity is {Valid: true} owned) targetName = IoCManager.Resolve().GetComponent(owned).EntityName; - return Loc.GetString("objective-condition-other-traitor-alive-title", ("targetName", targetName)); + return Loc.GetString("objective-condition-other-traitor-alive-title", ("targetName", targetName), ("job", jobName)); } } diff --git a/Resources/Locale/en-US/objectives/conditions/kill-person-condition.ftl b/Resources/Locale/en-US/objectives/conditions/kill-person-condition.ftl index 98112d91b0..2947bf2ec6 100644 --- a/Resources/Locale/en-US/objectives/conditions/kill-person-condition.ftl +++ b/Resources/Locale/en-US/objectives/conditions/kill-person-condition.ftl @@ -1,2 +1,2 @@ -objective-condition-kill-person-title = Kill {$targetName} -objective-condition-kill-person-description = Do it however you like, just make sure they don't last the shift. \ No newline at end of file +objective-condition-kill-person-title = Kill {$targetName}, {CAPITALIZE($job)} +objective-condition-kill-person-description = Do it however you like, just make sure they don't last the shift. diff --git a/Resources/Locale/en-US/objectives/conditions/other-traitor-alive-condition.ftl b/Resources/Locale/en-US/objectives/conditions/other-traitor-alive-condition.ftl index ddff1de051..54ddc31c10 100644 --- a/Resources/Locale/en-US/objectives/conditions/other-traitor-alive-condition.ftl +++ b/Resources/Locale/en-US/objectives/conditions/other-traitor-alive-condition.ftl @@ -1,2 +1,2 @@ -objective-condition-other-traitor-alive-title = Ensure fellow traitor {$targetName} stays alive. +objective-condition-other-traitor-alive-title = Ensure fellow traitor {$targetName}, {CAPITALIZE($job)} stays alive. objective-condition-other-traitor-alive-description = Identify yourself at your own risk. We just need them alive.