cleanup some relics of old TypeDictionary
This commit is contained in:
@@ -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<Chronoshiftable>().Any()
|
||||
&& a.traits.Contains<Chronoshiftable>()
|
||||
&& a.traits.Contains<Selectable>()).FirstOrDefault();
|
||||
|
||||
if (underCursor != null)
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
if (a.traits.Contains<AutoHeal>())
|
||||
return PipType.Yellow;
|
||||
if (!a.traits.WithInterface<AttackBase>().Any())
|
||||
if (!a.traits.Contains<AttackBase>())
|
||||
return PipType.Yellow; // noncombat [E6,SPY,THF]
|
||||
if (a.traits.Contains<C4Demolition>())
|
||||
return PipType.Red; // E7
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
if (mi.Button != MouseButton.Right) return null;
|
||||
if (underCursor != null) return null;
|
||||
if (underCursor.traits.WithInterface<IAcceptSpy>().Any()) return null;
|
||||
if (underCursor.traits.Contains<IAcceptSpy>()) return null;
|
||||
|
||||
return new Order("Infiltrate", self, underCursor, int2.Zero, null);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
if (mi.Button != MouseButton.Right) return null;
|
||||
if (underCursor == null) return null;
|
||||
if (!underCursor.traits.WithInterface<IAcceptThief>().Any()) return null;
|
||||
if (!underCursor.traits.Contains<IAcceptThief>()) return null;
|
||||
|
||||
return new Order("Steal", self, underCursor, int2.Zero, null);
|
||||
}
|
||||
|
||||
@@ -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<ICrushable>().Any()))
|
||||
foreach (var a in Game.world.Actors.Where(b => b.traits.Contains<ICrushable>()))
|
||||
{
|
||||
// Are there any units in the same cell that can crush this?
|
||||
foreach( var ios in a.traits.WithInterface<IOccupySpace>() )
|
||||
|
||||
Reference in New Issue
Block a user