Fix IDE0039
This commit is contained in:
@@ -207,7 +207,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public MiniYaml Save()
|
||||
{
|
||||
Func<object, bool> saveInit = init =>
|
||||
bool SaveInit(ActorInit init)
|
||||
{
|
||||
if (init is FactionInit factionInit && factionInit.Value == Owner.Faction)
|
||||
return false;
|
||||
@@ -218,9 +218,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// TODO: Other default values will need to be filtered
|
||||
// here after we have built a properties panel
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
return reference.Save(saveInit);
|
||||
return reference.Save(SaveInit);
|
||||
}
|
||||
|
||||
WPos PreviewPosition(World world, ActorReference actor)
|
||||
|
||||
@@ -303,12 +303,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
if (check > BlockedByActor.None)
|
||||
{
|
||||
Func<Actor, bool> checkTransient = otherActor => IsBlockedBy(self, otherActor, ignoreActor, cell, check, GetCache(cell).CellFlag);
|
||||
bool CheckTransient(Actor otherActor) => IsBlockedBy(self, otherActor, ignoreActor, cell, check, GetCache(cell).CellFlag);
|
||||
|
||||
if (!sharesCell)
|
||||
return world.ActorMap.AnyActorsAt(cell, SubCell.FullCell, checkTransient) ? SubCell.Invalid : SubCell.FullCell;
|
||||
return world.ActorMap.AnyActorsAt(cell, SubCell.FullCell, CheckTransient) ? SubCell.Invalid : SubCell.FullCell;
|
||||
|
||||
return world.ActorMap.FreeSubCell(cell, preferredSubCell, checkTransient);
|
||||
return world.ActorMap.FreeSubCell(cell, preferredSubCell, CheckTransient);
|
||||
}
|
||||
|
||||
if (!sharesCell)
|
||||
|
||||
@@ -26,14 +26,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
var missingImages = new HashSet<string>();
|
||||
var failed = false;
|
||||
Action<uint, string> onMissingImage = (id, f) =>
|
||||
void OnMissingImage(uint id, string f)
|
||||
{
|
||||
onError($"\tTemplate `{id}` references sprite `{f}` that does not exist.");
|
||||
missingImages.Add(f);
|
||||
failed = true;
|
||||
};
|
||||
}
|
||||
|
||||
var tileCache = new DefaultTileCache((DefaultTerrain)terrainInfo, onMissingImage);
|
||||
var tileCache = new DefaultTileCache((DefaultTerrain)terrainInfo, OnMissingImage);
|
||||
foreach (var t in terrainInfo.Templates)
|
||||
{
|
||||
var templateInfo = (DefaultTerrainTemplateInfo)t.Value;
|
||||
|
||||
Reference in New Issue
Block a user