Add hotkey for removing actors from control groups
* Add `RemoveFromControlGroup` hotkey * Add `RemoveFromControlGroup` method to `OpenRA.Game.Selection`
This commit is contained in:
committed by
Oliver Brakmann
parent
99987db5d9
commit
7695714f66
@@ -187,6 +187,13 @@ namespace OpenRA
|
||||
controlGroups[group].Add(a);
|
||||
}
|
||||
|
||||
public void RemoveFromControlGroup(Actor a)
|
||||
{
|
||||
var group = GetControlGroupForActor(a);
|
||||
if (group.HasValue)
|
||||
controlGroups[group.Value].Remove(a);
|
||||
}
|
||||
|
||||
public int? GetControlGroupForActor(Actor a)
|
||||
{
|
||||
return controlGroups.Where(g => g.Value.Contains(a))
|
||||
|
||||
Reference in New Issue
Block a user