.Any(), .Count() -> .Count or .Length
This commit is contained in:
committed by
atlimit8
parent
6eb4fe8980
commit
79f321cb44
@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// Less harvesters than refineries - build a new harvester
|
||||
var unitBuilder = requestUnitProduction.FirstOrDefault(Exts.IsTraitEnabled);
|
||||
if (unitBuilder != null && Info.HarvesterTypes.Any())
|
||||
if (unitBuilder != null && Info.HarvesterTypes.Count > 0)
|
||||
{
|
||||
var harvInfo = AIUtils.GetInfoByCommonName(Info.HarvesterTypes, player);
|
||||
var harvCountTooLow = AIUtils.CountActorByCommonName(Info.HarvesterTypes, player) < AIUtils.CountBuildingByCommonName(Info.RefineryTypes, player);
|
||||
|
||||
Reference in New Issue
Block a user