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
@@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
if (ShouldLandAtBuilding(self, dest))
|
||||
{
|
||||
var exit = dest.FirstExitOrDefault(null);
|
||||
var exit = dest.FirstExitOrDefault();
|
||||
var offset = exit != null ? exit.Info.SpawnOffset : WVec.Zero;
|
||||
if (aircraft.Info.TurnToDock || !aircraft.Info.VTOL)
|
||||
facing = aircraft.Info.InitialFacing;
|
||||
|
||||
@@ -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