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

@@ -33,8 +33,7 @@ namespace OpenRA.Mods.Cnc.Scripting
using (kv.Value)
{
if (!kv.Key.TryGetClrValue(out actor) || !kv.Value.TryGetClrValue(out cell))
throw new LuaException("Chronoshift requires a table of Actor,CPos pairs. Received {0},{1}".F(
kv.Key.WrappedClrType().Name, kv.Value.WrappedClrType().Name));
throw new LuaException($"Chronoshift requires a table of Actor,CPos pairs. Received {kv.Key.WrappedClrType().Name},{kv.Value.WrappedClrType().Name}");
}
var cs = actor.TraitsImplementing<Chronoshiftable>()

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Cnc.Scripting
var infiltrates = infiltratesTraits.FirstOrDefault(x => !x.IsTraitDisabled && x.Info.Types.Overlaps(target.GetEnabledTargetTypes()));
if (infiltrates == null)
throw new LuaException("{0} tried to infiltrate invalid target {1}!".F(Self, target));
throw new LuaException($"{Self} tried to infiltrate invalid target {target}!");
// NB: Scripted actions get no visible targetlines.
Self.QueueActivity(new Infiltrate(Self, Target.FromActor(target), infiltrates, null));