diff --git a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs index bc59e480c5..bbd2ae4b22 100644 --- a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs +++ b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs @@ -30,7 +30,7 @@ namespace OpenRa.Game.Orders var loc = mi.Location + Game.viewport.Location; var underCursor = Game.FindUnits(loc, loc) .Where(a => a.Owner == Game.LocalPlayer - && a.traits.WithInterface().Any() + && a.traits.Contains() && a.traits.Contains()).FirstOrDefault(); if (underCursor != null) diff --git a/OpenRa.Game/Traits/Cargo.cs b/OpenRa.Game/Traits/Cargo.cs index c9b99b79a7..daa48cc5f5 100644 --- a/OpenRa.Game/Traits/Cargo.cs +++ b/OpenRa.Game/Traits/Cargo.cs @@ -79,7 +79,7 @@ namespace OpenRa.Game.Traits if (a.traits.Contains()) return PipType.Yellow; - if (!a.traits.WithInterface().Any()) + if (!a.traits.Contains()) return PipType.Yellow; // noncombat [E6,SPY,THF] if (a.traits.Contains()) return PipType.Red; // E7 diff --git a/OpenRa.Game/Traits/Spy.cs b/OpenRa.Game/Traits/Spy.cs index 7948a6a2f7..5d77b84ab2 100644 --- a/OpenRa.Game/Traits/Spy.cs +++ b/OpenRa.Game/Traits/Spy.cs @@ -14,7 +14,7 @@ namespace OpenRa.Game.Traits { if (mi.Button != MouseButton.Right) return null; if (underCursor != null) return null; - if (underCursor.traits.WithInterface().Any()) return null; + if (underCursor.traits.Contains()) return null; return new Order("Infiltrate", self, underCursor, int2.Zero, null); } diff --git a/OpenRa.Game/Traits/Thief.cs b/OpenRa.Game/Traits/Thief.cs index 685ccefa68..8bc00522f8 100644 --- a/OpenRa.Game/Traits/Thief.cs +++ b/OpenRa.Game/Traits/Thief.cs @@ -11,7 +11,7 @@ namespace OpenRa.Game.Traits { if (mi.Button != MouseButton.Right) return null; if (underCursor == null) return null; - if (!underCursor.traits.WithInterface().Any()) return null; + if (!underCursor.traits.Contains()) return null; return new Order("Steal", self, underCursor, int2.Zero, null); } diff --git a/OpenRa.Game/UnitInfluenceMap.cs b/OpenRa.Game/UnitInfluenceMap.cs index c796f52e0a..c35e66ee0d 100644 --- a/OpenRa.Game/UnitInfluenceMap.cs +++ b/OpenRa.Game/UnitInfluenceMap.cs @@ -25,7 +25,7 @@ namespace OpenRa.Game // Does this belong here? NO, but it's your mess. // Get the crushable actors - foreach (var a in Game.world.Actors.Where(b => b.traits.WithInterface().Any())) + foreach (var a in Game.world.Actors.Where(b => b.traits.Contains())) { // Are there any units in the same cell that can crush this? foreach( var ios in a.traits.WithInterface() )