Fix IDE0053
This commit is contained in:
committed by
Pavel Penev
parent
37afd6094e
commit
939f715e3c
@@ -47,10 +47,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
return true;
|
||||
},
|
||||
(actor, value) =>
|
||||
{
|
||||
actor.ReplaceInit(new FreeActorInit(this, value), this);
|
||||
});
|
||||
(actor, value) => actor.ReplaceInit(new FreeActorInit(this, value), this));
|
||||
}
|
||||
|
||||
public override object Create(ActorInitializer init) { return new FreeActor(init, this); }
|
||||
|
||||
@@ -125,9 +125,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
checkTerrainType = info.UnloadTerrainTypes.Count > 0;
|
||||
|
||||
currentAdjacentCells = new CachedTransform<CPos, IEnumerable<CPos>>(loc =>
|
||||
{
|
||||
return Util.AdjacentCells(self.World, Target.FromActor(self)).Where(c => loc != c);
|
||||
});
|
||||
Util.AdjacentCells(self.World, Target.FromActor(self)).Where(c => loc != c));
|
||||
|
||||
var runtimeCargoInit = init.GetOrDefault<RuntimeCargoInit>(info);
|
||||
var cargoInit = init.GetOrDefault<CargoInit>(info);
|
||||
|
||||
@@ -81,9 +81,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return false;
|
||||
},
|
||||
(actor, value) =>
|
||||
{
|
||||
actor.ReplaceInit(new DeployStateInit(value ? DeployState.Deployed : DeployState.Undeployed));
|
||||
});
|
||||
actor.ReplaceInit(new DeployStateInit(value ? DeployState.Deployed : DeployState.Undeployed)));
|
||||
}
|
||||
|
||||
public override object Create(ActorInitializer init) { return new GrantConditionOnDeploy(init, this); }
|
||||
|
||||
@@ -252,7 +252,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
MarkFailed(player, id);
|
||||
}
|
||||
|
||||
public event Action<Player, bool> ObjectiveAdded = (player, inhibitAnnouncement) => { player.HasObjectives = true; };
|
||||
public event Action<Player, bool> ObjectiveAdded = (player, inhibitAnnouncement) => player.HasObjectives = true;
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
|
||||
@@ -61,9 +61,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
base.Created(self);
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
remainingTicks = Util.ApplyPercentageModifiers(Info.Delay, modifiers.Select(m => m.GetReloadAmmoModifier()));
|
||||
});
|
||||
remainingTicks = Util.ApplyPercentageModifiers(Info.Delay, modifiers.Select(m => m.GetReloadAmmoModifier())));
|
||||
}
|
||||
|
||||
void INotifyAttack.Attacking(Actor self, in Target target, Armament a, Barrel barrel)
|
||||
|
||||
@@ -230,10 +230,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (beacon == null)
|
||||
return;
|
||||
|
||||
Self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
w.Remove(beacon);
|
||||
});
|
||||
Self.World.AddFrameEndTask(w => w.Remove(beacon));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,10 +204,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Info.BeaconDelay,
|
||||
info.FlightDelay - info.BeaconRemoveAdvance);
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
w.Add(beacon);
|
||||
});
|
||||
self.World.AddFrameEndTask(w => w.Add(beacon));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -283,10 +283,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (beacon == null)
|
||||
return;
|
||||
|
||||
Self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
w.Remove(beacon);
|
||||
});
|
||||
Self.World.AddFrameEndTask(w => w.Remove(beacon));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,10 +284,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
for (var i = (byte)SubCell.First; i < map.Grid.SubCellOffsets.Length; i++)
|
||||
{
|
||||
var blocked = previews.Any(p =>
|
||||
{
|
||||
return p.Footprint.TryGetValue(cell, out var s) && s == (SubCell)i;
|
||||
});
|
||||
var blocked = previews.Any(p => p.Footprint.TryGetValue(cell, out var s) && s == (SubCell)i);
|
||||
|
||||
if (!blocked)
|
||||
return (SubCell)i;
|
||||
|
||||
Reference in New Issue
Block a user