more
This commit is contained in:
@@ -31,11 +31,9 @@ namespace OpenRa.Game.Orders
|
|||||||
var underCursor = Game.FindUnits(loc, loc)
|
var underCursor = Game.FindUnits(loc, loc)
|
||||||
.Where(a => a.Owner == Game.LocalPlayer
|
.Where(a => a.Owner == Game.LocalPlayer
|
||||||
&& a.traits.WithInterface<Chronoshiftable>().Any()
|
&& a.traits.WithInterface<Chronoshiftable>().Any()
|
||||||
&& a.LegacyInfo.Selectable).FirstOrDefault();
|
&& a.traits.Contains<Selectable>()).FirstOrDefault();
|
||||||
|
|
||||||
var unit = underCursor != null ? underCursor.LegacyInfo as LegacyUnitInfo : null;
|
if (underCursor != null)
|
||||||
|
|
||||||
if (unit != null)
|
|
||||||
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, power.Name);
|
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, power.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,11 +31,9 @@ namespace OpenRa.Game.Orders
|
|||||||
var underCursor = Game.FindUnits(loc, loc)
|
var underCursor = Game.FindUnits(loc, loc)
|
||||||
.Where(a => a.Owner == Game.LocalPlayer
|
.Where(a => a.Owner == Game.LocalPlayer
|
||||||
&& a.traits.Contains<IronCurtainable>()
|
&& a.traits.Contains<IronCurtainable>()
|
||||||
&& a.LegacyInfo.Selectable).FirstOrDefault();
|
&& a.traits.Contains<Selectable>()).FirstOrDefault();
|
||||||
|
|
||||||
var unit = underCursor != null ? underCursor.LegacyInfo as LegacyUnitInfo : null;
|
if (underCursor != null)
|
||||||
|
|
||||||
if (unit != null)
|
|
||||||
yield return new Order("IronCurtain", underCursor, null, int2.Zero, power.Name);
|
yield return new Order("IronCurtain", underCursor, null, int2.Zero, power.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using IrrKlang;
|
using IrrKlang;
|
||||||
using OpenRa.FileFormats;
|
using OpenRa.FileFormats;
|
||||||
using OpenRa.Game.GameRules;
|
using OpenRa.Game.GameRules;
|
||||||
|
using OpenRa.Game.Traits;
|
||||||
|
|
||||||
namespace OpenRa.Game
|
namespace OpenRa.Game
|
||||||
{
|
{
|
||||||
@@ -92,7 +93,7 @@ namespace OpenRa.Game
|
|||||||
{
|
{
|
||||||
if (voicedUnit == null) return;
|
if (voicedUnit == null) return;
|
||||||
|
|
||||||
var mi = voicedUnit.LegacyInfo as LegacyMobileInfo;
|
var mi = voicedUnit.Info.Traits.GetOrDefault<SelectableInfo>();
|
||||||
if (mi == null) return;
|
if (mi == null) return;
|
||||||
|
|
||||||
var vi = Rules.VoiceInfo[mi.Voice];
|
var vi = Rules.VoiceInfo[mi.Voice];
|
||||||
|
|||||||
Reference in New Issue
Block a user