Fix CA1862

This commit is contained in:
RoosterDragon
2024-11-13 19:02:20 +00:00
committed by Pavel Penev
parent ed90322a0b
commit 332ab244a7
5 changed files with 12 additions and 3 deletions

View File

@@ -150,7 +150,9 @@ namespace OpenRA.Mods.Common.Activities
var positionable = (IPositionable)movement;
var mobile = positionable as Mobile;
minefield.RemoveAll(c => self.World.ActorMap.GetActorsAt(c)
.Any(a => a.Info.Name == minelayer.Info.Mine.ToLowerInvariant() && a.CanBeViewedByPlayer(self.Owner)) ||
.Any(a =>
string.Equals(a.Info.Name, minelayer.Info.Mine, System.StringComparison.OrdinalIgnoreCase)
&& a.CanBeViewedByPlayer(self.Owner)) ||
((!positionable.CanEnterCell(c, null, BlockedByActor.Immovable) || (mobile != null && !mobile.CanStayInCell(c)))
&& self.Owner.Shroud.IsVisible(c)));
}