Add character names to round end screen and localize more of the strings (#5088)
* Add character names and move more traitor round end strings to fluent * Change coloring and wording * Fix no objectives
This commit is contained in:
@@ -174,29 +174,43 @@ namespace Content.Server.GameTicking.Presets
|
||||
|
||||
public override string GetRoundEndDescription()
|
||||
{
|
||||
var result = Loc.GetString(
|
||||
"traitor-round-end-result",
|
||||
("traitorCount", _traitors.Count)
|
||||
);
|
||||
var result = Loc.GetString("traitor-round-end-result", ("traitorCount", _traitors.Count));
|
||||
|
||||
foreach (var traitor in _traitors)
|
||||
{
|
||||
if (traitor.Mind.TryGetSession(out var session))
|
||||
{
|
||||
result += "\n" + Loc.GetString("traitor-user-was-a-traitor", ("user", session.Name));
|
||||
}
|
||||
var name = traitor.Mind.CharacterName;
|
||||
traitor.Mind.TryGetSession(out var session);
|
||||
var username = session?.Name;
|
||||
|
||||
var objectives = traitor.Mind.AllObjectives.ToArray();
|
||||
if (objectives.Length == 0)
|
||||
{
|
||||
result += ".\n";
|
||||
if (username != null)
|
||||
{
|
||||
if (name == null)
|
||||
result += "\n" + Loc.GetString("traitor-user-was-a-traitor", ("user", username));
|
||||
else
|
||||
result += "\n" + Loc.GetString("traitor-user-was-a-traitor-named", ("user", username), ("name", name));
|
||||
}
|
||||
else if (name != null)
|
||||
result += "\n" + Loc.GetString("traitor-was-a-traitor-named", ("name", name));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
result += Loc.GetString("traitor-objective-list-start");
|
||||
if (username != null)
|
||||
{
|
||||
if (name == null)
|
||||
result += "\n" + Loc.GetString("traitor-user-was-a-traitor-with-objectives", ("user", username));
|
||||
else
|
||||
result += "\n" + Loc.GetString("traitor-user-was-a-traitor-with-objectives-named", ("user", username), ("name", name));
|
||||
}
|
||||
else if (name != null)
|
||||
result += "\n" + Loc.GetString("traitor-was-a-traitor-with-objectives-named", ("name", name));
|
||||
|
||||
foreach (var objectiveGroup in objectives.GroupBy(o => o.Prototype.Issuer))
|
||||
{
|
||||
result += $"\n[color=#87cefa]{objectiveGroup.Key}[/color]";
|
||||
result += "\n" + Loc.GetString($"preset-traitor-objective-issuer-{objectiveGroup.Key}");
|
||||
|
||||
foreach (var objective in objectiveGroup)
|
||||
{
|
||||
|
||||
@@ -8,10 +8,15 @@ traitor-round-end-result = {$traitorCount ->
|
||||
}
|
||||
|
||||
# Shown at the end of a round of Traitor
|
||||
traitor-user-was-a-traitor = {$user} was a traitor.
|
||||
traitor-user-was-a-traitor = [color=gray]{$user}[/color] was a traitor.
|
||||
traitor-user-was-a-traitor-named = [color=White]{$name}[/color] ([color=gray]{$user}[/color]) was a traitor.
|
||||
traitor-was-a-traitor-named = [color=White]{$name}[/color] was a traitor.
|
||||
|
||||
# Shown at the end of a round of Traitor
|
||||
traitor-objective-list-start = and had the following objectives:
|
||||
traitor-user-was-a-traitor-with-objectives = [color=gray]{$user}[/color] was a traitor who had the following objectives:
|
||||
traitor-user-was-a-traitor-with-objectives-named = [color=White]{$name}[/color] ([color=gray]{$user}[/color]) was a traitor who had the following objectives:
|
||||
traitor-was-a-traitor-with-objectives-named = [color=White]{$name}[/color] was a traitor who had the following objectives:
|
||||
|
||||
preset-traitor-objective-issuer-syndicate = [color=#87cefa]The Syndicate[/color]
|
||||
|
||||
# Shown at the end of a round of Traitor
|
||||
traitor-objective-condition-success = {$condition} | [color={$markupColor}]Success![/color]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
- type: objective
|
||||
id: CaptainIDStealObjective
|
||||
issuer: The Syndicate
|
||||
issuer: syndicate
|
||||
requirements:
|
||||
- !type:TraitorRequirement {}
|
||||
- !type:IncompatibleConditionsRequirement
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
- type: objective
|
||||
id: KillRandomObjective
|
||||
issuer: The Syndicate
|
||||
issuer: syndicate
|
||||
requirements:
|
||||
- !type:TraitorRequirement {}
|
||||
conditions:
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
- type: objective
|
||||
id: StayAliveObjective
|
||||
issuer: The Syndicate
|
||||
issuer: syndicate
|
||||
requirements:
|
||||
- !type:TraitorRequirement {}
|
||||
- !type:IncompatibleConditionsRequirement
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
- type: objective
|
||||
id: DieObjective
|
||||
issuer: The Syndicate
|
||||
issuer: syndicate
|
||||
requirements:
|
||||
- !type:TraitorRequirement {}
|
||||
- !type:IncompatibleConditionsRequirement
|
||||
|
||||
Reference in New Issue
Block a user