Removed old Loc.GetString() use instances (#4155)

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Galactic Chimp
2021-06-21 02:13:54 +02:00
committed by GitHub
parent 4a46fbe6dd
commit 392b820796
523 changed files with 3082 additions and 1551 deletions

View File

@@ -84,6 +84,6 @@ namespace Content.Server.GameTicking.Presets
return true;
}
public virtual string GetRoundEndDescription() => "";
public virtual string GetRoundEndDescription() => string.Empty;
}
}

View File

@@ -35,7 +35,7 @@ namespace Content.Server.GameTicking.Presets
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public override string ModeTitle => "Traitor";
public override string ModeTitle => Loc.GetString("traitor-title");
private int MinPlayers { get; set; }
private int PlayersPerTraitor { get; set; }
@@ -59,13 +59,13 @@ namespace Content.Server.GameTicking.Presets
if (!force && readyPlayers.Count < MinPlayers)
{
_chatManager.DispatchServerAnnouncement($"Not enough players readied up for the game! There were {readyPlayers.Count} players readied up out of {MinPlayers} needed.");
_chatManager.DispatchServerAnnouncement(Loc.GetString("traitor-not-enough-ready-players", ("readyPlayersCount", readyPlayers.Count), ("minumumPlayers", MinPlayers)));
return false;
}
if (readyPlayers.Count == 0)
{
_chatManager.DispatchServerAnnouncement("No players readied up! Can't start Traitor.");
_chatManager.DispatchServerAnnouncement(Loc.GetString("traitor-no-one-ready"));
return false;
}

View File

@@ -119,7 +119,7 @@ namespace Content.Server.GameTicking.Presets
// The station is too drained of air to safely continue.
if (_safeToEndRound)
{
_chatManager.DispatchServerAnnouncement(Loc.GetString("The station is too unsafe to continue. You have one minute."));
_chatManager.DispatchServerAnnouncement(Loc.GetString("traitor-death-match-station-is-too-unsafe-announcement"));
_restarter.RoundMaxTime = TimeSpan.FromMinutes(1);
_restarter.RestartTimer();
_safeToEndRound = false;
@@ -214,20 +214,22 @@ namespace Content.Server.GameTicking.Presets
public override string GetRoundEndDescription()
{
var lines = new List<string>();
lines.Add("The PDAs recovered afterwards...");
lines.Add("traitor-death-match-end-round-description-first-line");
foreach (var entity in _entityManager.GetEntities(new TypeEntityQuery(typeof(PDAComponent))))
{
var pda = entity.GetComponent<PDAComponent>();
var uplink = pda.SyndicateUplinkAccount;
if ((uplink != null) && _allOriginalNames.ContainsKey(uplink))
if (uplink != null && _allOriginalNames.ContainsKey(uplink))
{
lines.Add(Loc.GetString("{0}'s PDA, with {1} TC", _allOriginalNames[uplink], uplink.Balance));
lines.Add(Loc.GetString("traitor-death-match-end-round-description-entry",
("originalName", _allOriginalNames[uplink]),
("tcBalance", uplink.Balance)));
}
}
return string.Join('\n', lines);
}
public override string ModeTitle => "Traitor Deathmatch";
public override string Description => Loc.GetString("Everyone's a traitor. Everyone wants each other dead.");
public override string ModeTitle => Loc.GetString("traitor-death-match-title");
public override string Description => Loc.GetString("traitor-death-match-description");
}
}