Fix RCS1227
This commit is contained in:
@@ -1109,6 +1109,9 @@ dotnet_diagnostic.RCS1225.severity = warning
|
|||||||
# Add paragraph to documentation comment.
|
# Add paragraph to documentation comment.
|
||||||
dotnet_diagnostic.RCS1226.severity = warning
|
dotnet_diagnostic.RCS1226.severity = warning
|
||||||
|
|
||||||
|
# Validate arguments correctly.
|
||||||
|
dotnet_diagnostic.RCS1227.severity = warning
|
||||||
|
|
||||||
# Unnecessary explicit use of enumerator.
|
# Unnecessary explicit use of enumerator.
|
||||||
dotnet_diagnostic.RCS1230.severity = warning
|
dotnet_diagnostic.RCS1230.severity = warning
|
||||||
|
|
||||||
|
|||||||
@@ -1353,6 +1353,10 @@ namespace OpenRA
|
|||||||
throw new ArgumentOutOfRangeException(nameof(maxRange),
|
throw new ArgumentOutOfRangeException(nameof(maxRange),
|
||||||
$"The requested range ({maxRange}) cannot exceed the value of MaximumTileSearchRange ({Grid.MaximumTileSearchRange})");
|
$"The requested range ({maxRange}) cannot exceed the value of MaximumTileSearchRange ({Grid.MaximumTileSearchRange})");
|
||||||
|
|
||||||
|
return FindTilesInAnnulus();
|
||||||
|
|
||||||
|
IEnumerable<CPos> FindTilesInAnnulus()
|
||||||
|
{
|
||||||
for (var i = minRange; i <= maxRange; i++)
|
for (var i = minRange; i <= maxRange; i++)
|
||||||
{
|
{
|
||||||
foreach (var offset in Grid.TilesByDistance[i])
|
foreach (var offset in Grid.TilesByDistance[i])
|
||||||
@@ -1363,6 +1367,7 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerable<CPos> FindTilesInCircle(CPos center, int maxRange, bool allowOutsideBounds = false)
|
public IEnumerable<CPos> FindTilesInCircle(CPos center, int maxRange, bool allowOutsideBounds = false)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user