move McvDeploy from rules into yaml. fix buttons on chronoSelect. removed extraneous PlayAnimation order.
This commit is contained in:
@@ -41,8 +41,8 @@ namespace OpenRa.Traits
|
||||
|
||||
var chronosphere = self.World.Actors.Where(a => a.Owner == self.Owner
|
||||
&& a.traits.Contains<Chronosphere>()).FirstOrDefault();
|
||||
if (chronosphere != null)
|
||||
Game.orderManager.IssueOrder(new Order("PlayAnimation", chronosphere, "active"));
|
||||
if( chronosphere != null )
|
||||
chronosphere.traits.Get<RenderBuilding>().PlayCustomAnim( chronosphere, "active" );
|
||||
|
||||
// Trigger screen desaturate effect
|
||||
foreach (var a in self.World.Actors.Where(a => a.traits.Contains<ChronoshiftPaletteEffect>()))
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace OpenRa.Traits
|
||||
{
|
||||
class ConstructionYardInfo : ITraitInfo
|
||||
{
|
||||
public readonly bool AllowUndeploy;
|
||||
|
||||
public object Create(Actor self) { return new ConstructionYard(self); }
|
||||
}
|
||||
|
||||
@@ -19,7 +21,7 @@ namespace OpenRa.Traits
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (!Rules.General.MCVUndeploy) return null;
|
||||
if (!self.Info.Traits.Get<ConstructionYardInfo>().AllowUndeploy) return null;
|
||||
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace OpenRa.Traits
|
||||
public override object Create(Actor self) { return new RenderBuilding(self); }
|
||||
}
|
||||
|
||||
class RenderBuilding : RenderSimple, INotifyDamage, INotifySold, IResolveOrder
|
||||
class RenderBuilding : RenderSimple, INotifyDamage, INotifySold
|
||||
{
|
||||
const int SmallBibStart = 1;
|
||||
const int LargeBibStart = 5;
|
||||
@@ -99,11 +99,5 @@ namespace OpenRa.Traits
|
||||
}
|
||||
|
||||
public void Sold(Actor self) { DoBib(self, true); }
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (order.OrderString == "PlayAnimation")
|
||||
PlayCustomAnim(self, order.TargetString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user