Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -91,7 +91,7 @@ namespace OpenRA.Mods.Common.Scripting
var result = new List<Actor>();
if (!Context.World.Map.Rules.Actors.TryGetValue(type, out var ai))
throw new LuaException("Unknown actor type '{0}'".F(type));
throw new LuaException($"Unknown actor type '{type}'");
result.AddRange(Player.World.Actors
.Where(actor => actor.Owner == Player && !actor.IsDead && actor.IsInWorld && actor.Info.Name == ai.Name));
@@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Scripting
foreach (var type in types)
if (!Context.World.Map.Rules.Actors.ContainsKey(type))
throw new LuaException("Unknown actor type '{0}'".F(type));
throw new LuaException($"Unknown actor type '{type}'");
result.AddRange(Player.World.Actors
.Where(actor => actor.Owner == Player && !actor.IsDead && actor.IsInWorld && types.Contains(actor.Info.Name)));
@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Scripting
{
var tt = Player.PlayerActor.TraitOrDefault<TechTree>();
if (tt == null)
throw new LuaException("Missing TechTree trait on player {0}!".F(Player));
throw new LuaException($"Missing TechTree trait on player {Player}!");
return tt.HasPrerequisites(type);
}