Make remove from control group hotkey available only to players

This commit is contained in:
Ivaylo Draganov
2022-02-04 20:12:40 +02:00
committed by Smittytron
parent c096934db8
commit f5ab9d95fe
7 changed files with 16 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
[ObjectCreator.UseCtor]
public RemoveFromControlGroupHotkeyLogic(Widget widget, ModData modData, World world, Dictionary<string, MiniYaml> logicArgs)
: base(widget, modData, "RemoveFromControlGroupKey", "WORLD_KEYHANDLER", logicArgs)
: base(widget, modData, "RemoveFromControlGroupKey", "PLAYER_KEYHANDLER", logicArgs)
{
selection = world.Selection;
this.world = world;

View File

@@ -10,8 +10,7 @@ Container@INGAME_ROOT:
TakeScreenshotKey: TakeScreenshot
MuteAudioKey: ToggleMute
LogicKeyListener@WORLD_KEYHANDLER:
Logic: CycleBasesHotkeyLogic, CycleProductionActorsHotkeyLogic, CycleHarvestersHotkeyLogic, JumpToLastEventHotkeyLogic, JumpToSelectedActorsHotkeyLogic, ResetZoomHotkeyLogic, TogglePlayerStanceColorHotkeyLogic, CycleStatusBarsHotkeyLogic, PauseHotkeyLogic, RemoveFromControlGroupHotkeyLogic, SelectUnitsByTypeHotkeyLogic, SelectAllUnitsHotkeyLogic
RemoveFromControlGroupKey: RemoveFromControlGroup
Logic: CycleBasesHotkeyLogic, CycleProductionActorsHotkeyLogic, CycleHarvestersHotkeyLogic, JumpToLastEventHotkeyLogic, JumpToSelectedActorsHotkeyLogic, ResetZoomHotkeyLogic, TogglePlayerStanceColorHotkeyLogic, CycleStatusBarsHotkeyLogic, PauseHotkeyLogic, SelectUnitsByTypeHotkeyLogic, SelectAllUnitsHotkeyLogic
CycleBasesKey: CycleBase
CycleProductionActorsKey: CycleProductionBuildings
CycleHarvestersKey: CycleHarvesters
@@ -1162,6 +1161,9 @@ Container@PLAYER_WIDGETS:
BookmarkSaveKeyPrefix: MapBookmarkSave
BookmarkRestoreKeyPrefix: MapBookmarkRestore
BookmarkKeyCount: 4
LogicKeyListener@PLAYER_KEYHANDLER:
Logic: RemoveFromControlGroupHotkeyLogic
RemoveFromControlGroupKey: RemoveFromControlGroup
ControlGroups@CONTROLGROUPS:
SelectGroupKeyPrefix: ControlGroupSelect
CreateGroupKeyPrefix: ControlGroupCreate

View File

@@ -10,8 +10,7 @@ Container@INGAME_ROOT:
TakeScreenshotKey: TakeScreenshot
MuteAudioKey: ToggleMute
LogicKeyListener@WORLD_KEYHANDLER:
Logic: CycleBasesHotkeyLogic, CycleProductionActorsHotkeyLogic, CycleHarvestersHotkeyLogic, JumpToLastEventHotkeyLogic, JumpToSelectedActorsHotkeyLogic, ResetZoomHotkeyLogic, TogglePlayerStanceColorHotkeyLogic, CycleStatusBarsHotkeyLogic, PauseHotkeyLogic, RemoveFromControlGroupHotkeyLogic, SelectUnitsByTypeHotkeyLogic, SelectAllUnitsHotkeyLogic
RemoveFromControlGroupKey: RemoveFromControlGroup
Logic: CycleBasesHotkeyLogic, CycleProductionActorsHotkeyLogic, CycleHarvestersHotkeyLogic, JumpToLastEventHotkeyLogic, JumpToSelectedActorsHotkeyLogic, ResetZoomHotkeyLogic, TogglePlayerStanceColorHotkeyLogic, CycleStatusBarsHotkeyLogic, PauseHotkeyLogic, SelectUnitsByTypeHotkeyLogic, SelectAllUnitsHotkeyLogic
CycleBasesKey: CycleBase
CycleProductionActorsKey: CycleProductionBuildings
CycleHarvestersKey: CycleHarvesters

View File

@@ -251,4 +251,4 @@ ControlGroupJumpTo10: NUMBER_0 Alt
RemoveFromControlGroup:
Description: Remove from control group
Types: ControlGroups
Contexts: Player, Spectator
Contexts: Player

View File

@@ -2,6 +2,9 @@ Container@PLAYER_WIDGETS:
Logic: LoadIngameChatLogic
Children:
Container@CHAT_ROOT:
LogicKeyListener@PLAYER_KEYHANDLER:
Logic: RemoveFromControlGroupHotkeyLogic
RemoveFromControlGroupKey: RemoveFromControlGroup
ControlGroups@CONTROLGROUPS:
SelectGroupKeyPrefix: ControlGroupSelect
CreateGroupKeyPrefix: ControlGroupCreate

View File

@@ -2,6 +2,9 @@ Container@PLAYER_WIDGETS:
Logic: LoadIngameChatLogic
Children:
Container@CHAT_ROOT:
LogicKeyListener@PLAYER_KEYHANDLER:
Logic: RemoveFromControlGroupHotkeyLogic
RemoveFromControlGroupKey: RemoveFromControlGroup
ControlGroups@CONTROLGROUPS:
SelectGroupKeyPrefix: ControlGroupSelect
CreateGroupKeyPrefix: ControlGroupCreate

View File

@@ -9,6 +9,9 @@ Container@PLAYER_WIDGETS:
DecreaseDepthPreviewContrastKey: DecreaseDepthPreviewContrast
IncreaseDepthPreviewOffsetKey: IncreaseDepthPreviewOffset
DecreaseDepthPreviewOffsetKey: DecreaseDepthPreviewOffset
LogicKeyListener@PLAYER_KEYHANDLER:
Logic: RemoveFromControlGroupHotkeyLogic
RemoveFromControlGroupKey: RemoveFromControlGroup
ControlGroups@CONTROLGROUPS:
SelectGroupKeyPrefix: ControlGroupSelect
CreateGroupKeyPrefix: ControlGroupCreate