Upgrade rule for victim scan radii changes

The game/engine now calculates the best values automatically and the field names have changed, so instead of renaming, we can just remove them under the assumption that only modders who really know what they're doing will ever use the override.
This commit is contained in:
reaperrr
2017-05-04 15:07:56 +02:00
committed by Chris Forbes
parent d04c6275da
commit 96d629cefd

View File

@@ -728,6 +728,20 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// Optimal victim scan radii are now calculated automatically
if (engineVersion < 20170505)
{
var targetExtraSearchRadius = node.Value.Nodes.FirstOrDefault(n => n.Key == "TargetSearchRadius" || n.Key == "TargetExtraSearchRadius");
if (targetExtraSearchRadius != null)
{
Console.WriteLine("Warheads and projectiles now calculate the best victim search radius automatically.");
Console.WriteLine("If you absolutely need to override that for whatever reason, use the new fields:");
Console.WriteLine("VictimScanRadius for warheads, BlockerScanRadius for projectiles,");
Console.WriteLine("BounceBlockerScanRadius for bouncing Bullets and AreaVictimScanRadius for AreaBeams.");
node.Value.Nodes.Remove(targetExtraSearchRadius);
}
}
UpgradeWeaponRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}