Replace UpgradeMinEnabledLevel checks with an EnabledByDefault shim.

This commit is contained in:
Paul Chote
2016-11-13 15:31:17 +00:00
parent e337048a97
commit 23f4ae5027
16 changed files with 49 additions and 21 deletions

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits.Render
// Defer this lookup until we really need it to ensure we get the correct value.
range = Exts.Lazy(() =>
{
var armaments = ai.TraitInfos<ArmamentInfo>().Where(a => a.UpgradeMinEnabledLevel == 0);
var armaments = ai.TraitInfos<ArmamentInfo>().Where(a => a.EnabledByDefault);
if (!armaments.Any())
return FallbackRange;