RCS0056 - roslynator_max_line_length = 160
This commit is contained in:
committed by
Matthias Mailänder
parent
9d5d2ab493
commit
0649f3dc32
@@ -100,8 +100,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return;
|
||||
|
||||
playerBuildings = world.ActorsHavingTrait<Building>().Where(a => a.Owner == player).ToArray();
|
||||
var excessPowerBonus = baseBuilder.Info.ExcessPowerIncrement * (playerBuildings.Length / baseBuilder.Info.ExcessPowerIncreaseThreshold.Clamp(1, int.MaxValue));
|
||||
minimumExcessPower = (baseBuilder.Info.MinimumExcessPower + excessPowerBonus).Clamp(baseBuilder.Info.MinimumExcessPower, baseBuilder.Info.MaximumExcessPower);
|
||||
var excessPowerBonus =
|
||||
baseBuilder.Info.ExcessPowerIncrement *
|
||||
(playerBuildings.Length / baseBuilder.Info.ExcessPowerIncreaseThreshold.Clamp(1, int.MaxValue));
|
||||
minimumExcessPower =
|
||||
(baseBuilder.Info.MinimumExcessPower + excessPowerBonus)
|
||||
.Clamp(baseBuilder.Info.MinimumExcessPower, baseBuilder.Info.MaximumExcessPower);
|
||||
|
||||
// PERF: Queue only one actor at a time per category
|
||||
itemQueuedThisTick = false;
|
||||
@@ -344,7 +348,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var buildingVariantInfo = actorInfo.TraitInfoOrDefault<PlaceBuildingVariantsInfo>();
|
||||
var variants = buildingVariantInfo?.Actors ?? Array.Empty<string>();
|
||||
|
||||
var count = playerBuildings.Count(a => a.Info.Name == name || variants.Contains(a.Info.Name)) + (baseBuilder.BuildingsBeingProduced.TryGetValue(name, out var num) ? num : 0);
|
||||
var count = playerBuildings.Count(a =>
|
||||
a.Info.Name == name || variants.Contains(a.Info.Name)) +
|
||||
(baseBuilder.BuildingsBeingProduced.TryGetValue(name, out var num) ? num : 0);
|
||||
|
||||
// Do we want to build this structure?
|
||||
if (count * 100 > frac.Value * playerBuildings.Length)
|
||||
|
||||
@@ -148,7 +148,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
foreach (var minelayer in minelayers)
|
||||
{
|
||||
var cells = pathFinder.FindPathToTargetCell(minelayer.Actor, new[] { minelayer.Actor.Location }, enemy.Location, BlockedByActor.Immovable, laneBias: false);
|
||||
var cells = pathFinder.FindPathToTargetCell(
|
||||
minelayer.Actor, new[] { minelayer.Actor.Location }, enemy.Location, BlockedByActor.Immovable, laneBias: false);
|
||||
if (cells != null && cells.Count != 0)
|
||||
{
|
||||
AIUtils.BotDebug($"{player}: try find a location to lay mine.");
|
||||
@@ -192,7 +193,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
foreach (var minelayer in minelayers)
|
||||
{
|
||||
var cells = pathFinder.FindPathToTargetCell(minelayer.Actor, new[] { minelayer.Actor.Location }, minelayingPosition, BlockedByActor.Immovable, laneBias: false);
|
||||
var cells = pathFinder.FindPathToTargetCell(
|
||||
minelayer.Actor, new[] { minelayer.Actor.Location }, minelayingPosition, BlockedByActor.Immovable, laneBias: false);
|
||||
if (cells != null && cells.Count != 0)
|
||||
{
|
||||
orderedActors.Add(minelayer.Actor);
|
||||
|
||||
@@ -24,10 +24,16 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("What support power does this decision apply to?")]
|
||||
public readonly string OrderName = "AirstrikePowerInfoOrder";
|
||||
|
||||
[Desc("What is the coarse scan radius of this power?", "For finding the general target area, before doing a detail scan", "Should be 10 or more to avoid lag")]
|
||||
[Desc(
|
||||
"What is the coarse scan radius of this power?",
|
||||
"For finding the general target area, before doing a detail scan",
|
||||
"Should be 10 or more to avoid lag")]
|
||||
public readonly int CoarseScanRadius = 20;
|
||||
|
||||
[Desc("What is the fine scan radius of this power?", "For doing a detailed scan in the general target area.", "Minimum is 1")]
|
||||
[Desc(
|
||||
"What is the fine scan radius of this power?",
|
||||
"For doing a detailed scan in the general target area.",
|
||||
"Minimum is 1")]
|
||||
public readonly int FineScanRadius = 2;
|
||||
|
||||
[FieldLoader.LoadUsing(nameof(LoadConsiderations))]
|
||||
|
||||
Reference in New Issue
Block a user