Ticket #3443: capture.patch

File capture.patch, 2.6 KB (added by mimo, 9 years ago)
  • binaries/data/config/default.cfg

     
    278278attack = Ctrl                ; Modifier to attack instead of another action (eg capture)
    279279attackmove = Ctrl            ; Modifier to attackmove when clicking on a point
    280280attackmoveUnit = "Ctrl+Q"    ; Modifier to attackmove targeting only units when clicking on a point (should contain the attackmove keys)
     281capture = "C"                ; Modifier to capture instead of another action (eg repair when allied structure)
    281282garrison = Ctrl              ; Modifier to garrison when clicking on building
    282283autorallypoint = Ctrl        ; Modifier to set the rally point on the building itself
    283284guard = "G"                  ; Modifier to escort/guard when clicking on unit/building
  • binaries/data/mods/public/gui/manual/intro.txt

     
    8282Ctrl + Right Click with units selected:
    8383    - If the cursor is over an allied structure: Garrison
    8484    - If the cursor is over a non-allied unit or building: Attack (instead of capture or gather)
    85     - Otherwise: Attack move (by default all enemy units and structures along the way are targeted, use Ctrl + Q + Right Click to target only units).
     85    - Otherwise: Attack move (by default all enemy units and structures along the way are targeted, use Ctrl + Q + Right Click to target only units).
     86C + Right Click: Force Capture when possible but not having priority
    8687
    8788[font="sans-bold-14"]Overlays
    8889[font="sans-14"]Alt + G: Hide/show the GUI
  • binaries/data/mods/public/gui/session/unit_actions.js

     
    101101                return false;
    102102            return {"possible": Engine.GuiInterfaceCall("CanCapture", {"entity": entState.id, "target": targetState.id})};
    103103        },
     104        "hotkeyActionCheck": function(target)
     105        {
     106            if (Engine.HotkeyIsPressed("session.capture") && getActionInfo("capture", target).possible)
     107                return {"type": "capture", "cursor": "action-capture", "target": target};
     108            return false;
     109        },
    104110        "actionCheck": function(target)
    105111        {
    106112            if (getActionInfo("capture", target).possible)