.Any(), .Count() -> .Count or .Length
This commit is contained in:
committed by
atlimit8
parent
6eb4fe8980
commit
79f321cb44
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
this.self = self;
|
||||
this.info = info;
|
||||
if (!info.Units.Any())
|
||||
if (info.Units.Length == 0)
|
||||
throw new YamlException("A GiveUnitCrateAction does not specify any units to give. This might be because the yaml is referring to 'Unit' rather than 'Units'.");
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (collector.Owner.NonCombatant)
|
||||
return false;
|
||||
|
||||
if (info.ValidFactions.Any() && !info.ValidFactions.Contains(collector.Owner.Faction.InternalName))
|
||||
if (info.ValidFactions.Count > 0 && !info.ValidFactions.Contains(collector.Owner.Faction.InternalName))
|
||||
return false;
|
||||
|
||||
foreach (var unit in info.Units)
|
||||
|
||||
Reference in New Issue
Block a user