Adds hotkey for forcing unit attack (useful for destroying enemy farms), based on patch by quonter. Fixes #1489
This was SVN commit r12703.
This commit is contained in:
parent
60f9fece29
commit
4c37e8de95
@ -227,6 +227,7 @@ hotkey.selection.group.add.9 = "Shift+9"
|
||||
|
||||
; > SESSION CONTROLS
|
||||
hotkey.session.kill = Delete ; Destroy selected units
|
||||
hotkey.session.attack = Ctrl ; Modifier to force attack instead of another action
|
||||
hotkey.session.garrison = Ctrl ; Modifier to garrison when clicking on building
|
||||
hotkey.session.queue = Shift ; Modifier to queue unit orders instead of replacing
|
||||
hotkey.session.batchtrain = Shift ; Modifier to train units in batches
|
||||
|
@ -465,6 +465,10 @@ function determineAction(x, y, fromMinimap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Engine.HotkeyIsPressed("session.attack") && getActionInfo("attack", target).possible)
|
||||
{
|
||||
return {"type": "attack", "cursor": "action-attack", "target": target};
|
||||
}
|
||||
else if (Engine.HotkeyIsPressed("session.garrison"))
|
||||
{
|
||||
if (getActionInfo("garrison", target).possible)
|
||||
|
Loading…
Reference in New Issue
Block a user