Ignore the types of an exit when the production type is null or empty
This commit is contained in:
committed by
Matthias Mailänder
parent
41657dd291
commit
a5bc841355
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
.OrderBy(e => e.Info.Priority);
|
||||
|
||||
if (string.IsNullOrEmpty(productionType))
|
||||
return all.FirstOrDefault(e => e.Info.ProductionTypes.Count == 0);
|
||||
return all.FirstOrDefault();
|
||||
|
||||
return all.FirstOrDefault(e => e.Info.ProductionTypes.Count == 0 || e.Info.ProductionTypes.Contains(productionType));
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
.Where(Exts.IsTraitEnabled);
|
||||
|
||||
if (string.IsNullOrEmpty(productionType))
|
||||
return all.Where(e => e.Info.ProductionTypes.Count == 0);
|
||||
return all;
|
||||
|
||||
return all.Where(e => e.Info.ProductionTypes.Count == 0 || e.Info.ProductionTypes.Contains(productionType));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user