diff --git a/OpenRa.Game/GameRules/GeneralInfo.cs b/OpenRa.Game/GameRules/GeneralInfo.cs index e89632f348..fa9f86e264 100644 --- a/OpenRa.Game/GameRules/GeneralInfo.cs +++ b/OpenRa.Game/GameRules/GeneralInfo.cs @@ -105,7 +105,6 @@ namespace OpenRa.GameRules /* Misc */ [Obsolete] public readonly bool FineDiffControl = false; - public readonly bool MCVUndeploy = false; /* OpenRA-specific */ public readonly float OreChance = 0; /* chance of spreading to a particular eligible cell */ diff --git a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs index 50b8ce4edc..0dc07e3bfd 100644 --- a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs +++ b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs @@ -20,7 +20,7 @@ namespace OpenRa.Orders IEnumerable OrderInner(World world, int2 xy, MouseInput mi) { - if (mi.Button == MouseButton.Right) + if (mi.Button == MouseButton.Left) { var loc = mi.Location + Game.viewport.Location; var underCursor = world.FindUnits(loc, loc) diff --git a/OpenRa.Game/Traits/ChronoshiftPower.cs b/OpenRa.Game/Traits/ChronoshiftPower.cs index 26143e1cdd..1c0c15487c 100644 --- a/OpenRa.Game/Traits/ChronoshiftPower.cs +++ b/OpenRa.Game/Traits/ChronoshiftPower.cs @@ -41,8 +41,8 @@ namespace OpenRa.Traits var chronosphere = self.World.Actors.Where(a => a.Owner == self.Owner && a.traits.Contains()).FirstOrDefault(); - if (chronosphere != null) - Game.orderManager.IssueOrder(new Order("PlayAnimation", chronosphere, "active")); + if( chronosphere != null ) + chronosphere.traits.Get().PlayCustomAnim( chronosphere, "active" ); // Trigger screen desaturate effect foreach (var a in self.World.Actors.Where(a => a.traits.Contains())) diff --git a/OpenRa.Game/Traits/ConstructionYard.cs b/OpenRa.Game/Traits/ConstructionYard.cs index 9a8a696880..03e986c07a 100644 --- a/OpenRa.Game/Traits/ConstructionYard.cs +++ b/OpenRa.Game/Traits/ConstructionYard.cs @@ -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().AllowUndeploy) return null; if (mi.Button == MouseButton.Left) return null; diff --git a/OpenRa.Game/Traits/RenderBuilding.cs b/OpenRa.Game/Traits/RenderBuilding.cs index 0ba2bcc1d4..1e0e41a5e7 100644 --- a/OpenRa.Game/Traits/RenderBuilding.cs +++ b/OpenRa.Game/Traits/RenderBuilding.cs @@ -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); - } } } diff --git a/mods/ra/rules.ini b/mods/ra/rules.ini index 1e045d3bdc..62c9bc9850 100644 --- a/mods/ra/rules.ini +++ b/mods/ra/rules.ini @@ -110,7 +110,6 @@ TeamDelay=.6 ; interval between checking for and creating teams ; misc FineDiffControl=no ; Allow 5 difficulty settings instead of only 3 settings? -MCVUndeploy=yes ; Allow construction yard to undeploy back into MCV? ; ******* Unit Statistics *******