From 9d4f683d80ef72d21ff09e3efc3406fd2d349d78 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 28 Oct 2019 23:50:58 +0000 Subject: [PATCH] Remove WorldRenderer argument from InputOverridesSelection. --- OpenRA.Game/Orders/GenericSelectTarget.cs | 2 +- OpenRA.Game/Orders/UnitOrderGenerator.cs | 2 +- OpenRA.Mods.Common/Traits/AttackMove.cs | 2 +- OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Game/Orders/GenericSelectTarget.cs b/OpenRA.Game/Orders/GenericSelectTarget.cs index d46298f27c..f25e8adc55 100644 --- a/OpenRA.Game/Orders/GenericSelectTarget.cs +++ b/OpenRA.Game/Orders/GenericSelectTarget.cs @@ -63,7 +63,7 @@ namespace OpenRA.Orders return world.Map.Contains(cell) ? Cursor : "generic-blocked"; } - public override bool InputOverridesSelection(WorldRenderer wr, World world, int2 xy, MouseInput mi) + public override bool InputOverridesSelection(World world, int2 xy, MouseInput mi) { // Custom order generators always override selection return true; diff --git a/OpenRA.Game/Orders/UnitOrderGenerator.cs b/OpenRA.Game/Orders/UnitOrderGenerator.cs index a2fcf866b9..3a6a87c16f 100644 --- a/OpenRA.Game/Orders/UnitOrderGenerator.cs +++ b/OpenRA.Game/Orders/UnitOrderGenerator.cs @@ -90,7 +90,7 @@ namespace OpenRA.Orders bool IOrderGenerator.HandleKeyPress(KeyInput e) { return false; } // Used for classic mouse orders, determines whether or not action at xy is move or select - public virtual bool InputOverridesSelection(WorldRenderer wr, World world, int2 xy, MouseInput mi) + public virtual bool InputOverridesSelection(World world, int2 xy, MouseInput mi) { var actor = world.ScreenMap.ActorsAtMouse(xy) .Where(a => !a.Actor.IsDead) diff --git a/OpenRA.Mods.Common/Traits/AttackMove.cs b/OpenRA.Mods.Common/Traits/AttackMove.cs index 549c6c8fe2..79352ba41a 100644 --- a/OpenRA.Mods.Common/Traits/AttackMove.cs +++ b/OpenRA.Mods.Common/Traits/AttackMove.cs @@ -142,7 +142,7 @@ namespace OpenRA.Mods.Common.Traits return prefix + "-blocked"; } - public override bool InputOverridesSelection(WorldRenderer wr, World world, int2 xy, MouseInput mi) + public override bool InputOverridesSelection(World world, int2 xy, MouseInput mi) { // Custom order generators always override selection return true; diff --git a/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs index b541807bd6..a4ed10ab87 100644 --- a/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs @@ -110,7 +110,7 @@ namespace OpenRA.Mods.Common.Widgets var selectableActor = World.ScreenMap.ActorsAtMouse(mousePos).Select(a => a.Actor).Any(x => x.Info.HasTraitInfo() && (x.Owner.IsAlliedWith(World.RenderPlayer) || !World.FogObscures(x))); - if (!selectableActor || uog.InputOverridesSelection(worldRenderer, World, mousePos, mi)) + if (!selectableActor || uog.InputOverridesSelection(World, mousePos, mi)) { // Order units instead of selecting ApplyOrders(World, mi);