Expose player names to localization.

This commit is contained in:
Matthias Mailänder
2024-07-30 21:23:13 +02:00
committed by Gustas
parent 9a46f3053a
commit 4e5556dccc
39 changed files with 203 additions and 77 deletions

View File

@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Traits
var player = new GameInformation.Player
{
ClientIndex = client.Index,
Name = Player.ResolvePlayerName(client, lobbyInfo.Clients, bots),
Name = client.Name,
IsHuman = client.Bot == null,
IsBot = client.Bot != null,
FactionName = resolvedFaction.Name,

View File

@@ -30,7 +30,9 @@ namespace OpenRA.Mods.Common.Traits
if (subjectClient == null)
{
Log.Write("debug", $"Tick {world.WorldTick}: Order sent to {order.Subject.Owner.PlayerName}: resolved ClientIndex `{subjectClientId}` doesn't exist");
Log.Write("debug", $"Tick {world.WorldTick}: " +
$"Order sent to {order.Subject.Owner.ResolvedPlayerName}: " +
$"resolved ClientIndex `{subjectClientId}` doesn't exist");
return false;
}