Skip to content

Commit

Permalink
Allow holding Ctrl to bypass "Hold Alt to force attack move" (FAForev…
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 authored May 30, 2024
1 parent fbdddaa commit 74c486a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/features.5906.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#5906) Allow holding Ctrl to bypass the "Hold alt to force attack move" option. This allows binding hotkeys that use rollover unit info (such as "Prioritize unit type") with Ctrl + Alt key combinations.
2 changes: 1 addition & 1 deletion lua/ui/controls/worldview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ WorldView = ClassUI(moho.UIWorldView, Control) {
order = self.CursorOverride

-- special override
elseif holdAltToAttackMove == 'On' and IsKeyDown(KeyCodeAlt) and selection then
elseif holdAltToAttackMove == 'On' and IsKeyDown(KeyCodeAlt) and not IsKeyDown(KeyCodeCtrl) and selection then
order = 'RULEUCC_AttackAlt'

-- usual order structure
Expand Down
2 changes: 1 addition & 1 deletion lua/ui/help/tooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ Tooltips = {

options_alt_to_force_attack_move = {
title = "<LOC ALT_TO_FORCE_ATTACK_MOVE_TITLE>Hold alt to force attack move",
description = "<LOC ALT_TO_FORCE_ATTACK_MOVE_DESCRIPTION>When enabled holding alt will always turn orders into an attack move order"
description = "<LOC ALT_TO_FORCE_ATTACK_MOVE_DESCRIPTION>When enabled holding alt will always turn orders into an attack move order, except when holding Ctrl"
},

options_area_commands_button = {
Expand Down

0 comments on commit 74c486a

Please sign in to comment.