Move Selection into a Trait

This commit is contained in:
Evgeniy S
2019-05-16 16:15:32 +03:00
committed by reaperrr
parent 6723306bb4
commit 3a30b013a5
14 changed files with 55 additions and 33 deletions

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
public class CycleBasesHotkeyLogic : SingleHotkeyBaseLogic
{
readonly Viewport viewport;
readonly Selection selection;
readonly ISelection selection;
readonly World world;
[ObjectCreator.UseCtor]

View File

@@ -14,6 +14,7 @@ using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Lint;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
@@ -22,7 +23,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
public class CycleProductionActorsHotkeyLogic : SingleHotkeyBaseLogic
{
readonly Viewport viewport;
readonly Selection selection;
readonly ISelection selection;
readonly World world;
readonly string clickSound = ChromeMetrics.Get<string>("ClickSound");

View File

@@ -12,6 +12,7 @@
using System.Collections.Generic;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Lint;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
@@ -20,7 +21,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
public class JumpToSelectedActorsHotkeyLogic : SingleHotkeyBaseLogic
{
readonly Viewport viewport;
readonly Selection selection;
readonly ISelection selection;
[ObjectCreator.UseCtor]
public JumpToSelectedActorsHotkeyLogic(Widget widget, ModData modData, WorldRenderer worldRenderer, World world, Dictionary<string, MiniYaml> logicArgs)

View File

@@ -12,6 +12,7 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Lint;
using OpenRA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
@@ -19,7 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
[ChromeLogicArgsHotkeys("RemoveFromControlGroupKey")]
public class RemoveFromControlGroupHotkeyLogic : SingleHotkeyBaseLogic
{
readonly Selection selection;
readonly ISelection selection;
readonly World world;
[ObjectCreator.UseCtor]