Fix lobby error messages from the server being untranslated

This commit is contained in:
abcdefg30
2022-07-11 13:21:14 +02:00
committed by Matthias Mailänder
parent 8d3ff9d2fc
commit 1628ce64db

View File

@@ -286,26 +286,25 @@ namespace OpenRA.Mods.Common.Server
{ {
if (!client.IsAdmin) if (!client.IsAdmin)
{ {
server.SendOrderTo(conn, "Message", OnlyHostStartGame); server.SendLocalizedMessageTo(conn, OnlyHostStartGame);
return true; return true;
} }
if (server.LobbyInfo.Slots.Any(sl => sl.Value.Required && if (server.LobbyInfo.Slots.Any(sl => sl.Value.Required && server.LobbyInfo.ClientInSlot(sl.Key) == null))
server.LobbyInfo.ClientInSlot(sl.Key) == null))
{ {
server.SendOrderTo(conn, "Message", NoStartUntilRequiredSlotsFull); server.SendLocalizedMessageTo(conn, NoStartUntilRequiredSlotsFull);
return true; return true;
} }
if (!server.LobbyInfo.GlobalSettings.EnableSingleplayer && server.LobbyInfo.NonBotPlayers.Count() < 2) if (!server.LobbyInfo.GlobalSettings.EnableSingleplayer && server.LobbyInfo.NonBotPlayers.Count() < 2)
{ {
server.SendOrderTo(conn, "Message", TwoHumansRequired); server.SendLocalizedMessageTo(conn, TwoHumansRequired);
return true; return true;
} }
if (LobbyUtils.InsufficientEnabledSpawnPoints(server.Map, server.LobbyInfo)) if (LobbyUtils.InsufficientEnabledSpawnPoints(server.Map, server.LobbyInfo))
{ {
server.SendOrderTo(conn, "Message", InsufficientEnabledSpawnPoints); server.SendLocalizedMessageTo(conn, InsufficientEnabledSpawnPoints);
return true; return true;
} }