Replace F extension with string interpolation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user