diff --git a/OpenRA.Game/Traits/Player/ProductionQueue.cs b/OpenRA.Game/Traits/Player/ProductionQueue.cs index c45bd71ccb..a7a5886940 100644 --- a/OpenRA.Game/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Game/Traits/Player/ProductionQueue.cs @@ -149,12 +149,12 @@ namespace OpenRA.Traits queue.RemoveAt(0); } - public void BeginProduction( string group, ProductionItem item ) + void BeginProduction( string group, ProductionItem item ) { production[group].Add(item); } - public void BuildUnit( string name ) + void BuildUnit( string name ) { var newUnitType = Rules.Info[ name ]; var producerTypes = Rules.TechTree.UnitBuiltAt( newUnitType ); diff --git a/OpenRA.Mods.Aftermath/ChronoshiftDeploy.cs b/OpenRA.Mods.Aftermath/ChronoshiftDeploy.cs index 4848d292a8..2ae65f060c 100644 --- a/OpenRA.Mods.Aftermath/ChronoshiftDeploy.cs +++ b/OpenRA.Mods.Aftermath/ChronoshiftDeploy.cs @@ -67,10 +67,6 @@ namespace OpenRA.Mods.Aftermath var movement = self.traits.GetOrDefault(); if (order.OrderString == "ChronoshiftSelf" && movement.CanEnterCell(order.TargetLocation)) { - // Cannot chronoshift into unexplored location - if (!self.Owner.Shroud.IsExplored(order.TargetLocation)) - return; - if (self.Owner == self.World.LocalPlayer) Game.controller.CancelInputMode(); diff --git a/OpenRA.Mods.Aftermath/Orders/SetChronoTankDestination.cs b/OpenRA.Mods.Aftermath/Orders/SetChronoTankDestination.cs index c9e2758b9f..e1bc515d4b 100644 --- a/OpenRA.Mods.Aftermath/Orders/SetChronoTankDestination.cs +++ b/OpenRA.Mods.Aftermath/Orders/SetChronoTankDestination.cs @@ -41,7 +41,8 @@ namespace OpenRA.Mods.Aftermath.Orders yield break; } - yield return new Order("ChronoshiftSelf", self, xy); + if (world.LocalPlayer.Shroud.IsExplored(xy)) + yield return new Order("ChronoshiftSelf", self, xy); } public void Tick( World world ) { } diff --git a/OpenRA.Mods.RA/ChronoshiftPower.cs b/OpenRA.Mods.RA/ChronoshiftPower.cs index 00e5ad0b1d..181139b950 100644 --- a/OpenRA.Mods.RA/ChronoshiftPower.cs +++ b/OpenRA.Mods.RA/ChronoshiftPower.cs @@ -50,10 +50,6 @@ namespace OpenRA.Mods.RA { if (self.Owner == self.World.LocalPlayer) Game.controller.CancelInputMode(); - - // Cannot chronoshift into unexplored location - if (!self.Owner.Shroud.IsExplored(order.TargetLocation)) - return; // Ensure the target cell is valid for the unit var movement = order.TargetActor.traits.GetOrDefault(); @@ -147,7 +143,9 @@ namespace OpenRA.Mods.RA yield break; } - yield return new Order("ChronosphereActivate", world.LocalPlayer.PlayerActor, self, xy); + // Cannot chronoshift into unexplored location + if (world.LocalPlayer.Shroud.IsExplored(xy)) + yield return new Order("ChronosphereActivate", world.LocalPlayer.PlayerActor, self, xy); } public void Tick(World world) diff --git a/OpenRA.TilesetBuilder/Form1.cs b/OpenRA.TilesetBuilder/Form1.cs index 6293776919..ff55d08279 100644 --- a/OpenRA.TilesetBuilder/Form1.cs +++ b/OpenRA.TilesetBuilder/Form1.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Windows.Forms; using System.Xml; -using System.Drawing.Imaging; namespace OpenRA.TilesetBuilder {