Make control group hotkeys configurable
- Split control groups management to its own interface - Add hotkeys for selecting, creating, adding to and combining with control groups - Add a ControlGroups widget to manage the player interaction
This commit is contained in:
committed by
abcdefg30
parent
04b456d6c2
commit
7a93b9ea8c
@@ -158,7 +158,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
void ReturnToOrigin()
|
||||
{
|
||||
var selected = self.World.Selection.Contains(self);
|
||||
var controlgroup = self.World.Selection.GetControlGroupForActor(self);
|
||||
var controlgroup = self.World.ControlGroups.GetControlGroupForActor(self);
|
||||
var mobileInfo = self.World.Map.Rules.Actors[info.OriginalActor].TraitInfo<MobileInfo>();
|
||||
var destination = ChooseBestDestinationCell(mobileInfo, origin);
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
self.World.Selection.Add(a);
|
||||
|
||||
if (controlgroup.HasValue)
|
||||
self.World.Selection.AddToControlGroup(a, controlgroup.Value);
|
||||
self.World.ControlGroups.AddToControlGroup(a, controlgroup.Value);
|
||||
|
||||
Game.Sound.Play(SoundType.World, info.ChronoshiftSound, self.World.Map.CenterOfCell(destination.Value));
|
||||
self.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user