Replace F extension with string interpolation
This commit is contained in:
@@ -229,7 +229,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var bot = botTypes.Random(Game.CosmeticRandom);
|
||||
var c = orderManager.LobbyInfo.ClientInSlot(slot.Key);
|
||||
if (slot.Value.AllowBots == true && (c == null || c.Bot != null))
|
||||
orderManager.IssueOrder(Order.Command("slot_bot {0} {1} {2}".F(slot.Key, botController.Index, bot)));
|
||||
orderManager.IssueOrder(Order.Command($"slot_bot {slot.Key} {botController.Index} {bot}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,9 +261,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
var teamOptions = Enumerable.Range(2, teamCount - 1).Reverse().Select(d => new DropDownOption
|
||||
{
|
||||
Title = "{0} Teams".F(d),
|
||||
Title = $"{d} Teams",
|
||||
IsSelected = () => false,
|
||||
OnClick = () => orderManager.IssueOrder(Order.Command("assignteams {0}".F(d.ToString())))
|
||||
OnClick = () => orderManager.IssueOrder(Order.Command($"assignteams {d.ToString()}"))
|
||||
}).ToList();
|
||||
|
||||
if (orderManager.LobbyInfo.Slots.Any(s => s.Value.AllowBots))
|
||||
@@ -518,7 +518,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (map.Status == MapStatus.Available)
|
||||
{
|
||||
// Tell the server that we have the map
|
||||
orderManager.IssueOrder(Order.Command("state {0}".F(Session.ClientState.NotReady)));
|
||||
orderManager.IssueOrder(Order.Command($"state {Session.ClientState.NotReady}"));
|
||||
|
||||
if (addBotOnMapLoad)
|
||||
{
|
||||
@@ -526,7 +526,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var bot = map.PlayerActorInfo.TraitInfos<IBotInfo>().Select(t => t.Type).FirstOrDefault();
|
||||
var botController = orderManager.LobbyInfo.Clients.FirstOrDefault(c => c.IsAdmin);
|
||||
if (slot != null && bot != null)
|
||||
orderManager.IssueOrder(Order.Command("slot_bot {0} {1} {2}".F(slot, botController.Index, bot)));
|
||||
orderManager.IssueOrder(Order.Command($"slot_bot {slot} {botController.Index} {bot}"));
|
||||
|
||||
addBotOnMapLoad = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user