Skip check for ITemporaryBlocker entirely if rules don't contain any temporary blockers
This benefits all mods without temporary blockers like gates or energy walls.
This commit is contained in:
@@ -149,6 +149,8 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
public bool RulesContainTemporaryBlocker { get; private set; }
|
||||
|
||||
internal World(ModData modData, Map map, OrderManager orderManager, WorldType type)
|
||||
{
|
||||
Type = type;
|
||||
@@ -185,6 +187,8 @@ namespace OpenRA
|
||||
MapUid = Map.Uid,
|
||||
MapTitle = Map.Title
|
||||
};
|
||||
|
||||
RulesContainTemporaryBlocker = map.Rules.Actors.Any(a => a.Value.HasTraitInfo<ITemporaryBlockerInfo>());
|
||||
}
|
||||
|
||||
public void AddToMaps(Actor self, IOccupySpace ios)
|
||||
|
||||
Reference in New Issue
Block a user