Ticket #4008: missingunitactionhotkeys_v2.3.patch

File missingunitactionhotkeys_v2.3.patch, 6.5 KB (added by Imarok, 8 years ago)

Fixed some style mentioned by elexis in irc today

  • binaries/data/config/default.cfg

     
    181181[hotkey.camera]
    182182reset = "R"                                   ; Reset camera rotation to default.
    183183follow = "F"                                  ; Follow the first unit in the selection
     184rallypointfocus = unused                      ; Focus the camera on the rally point of the selected building
    184185zoom.in = Plus, Equals, NumPlus               ; Zoom camera in (continuous control)
    185186zoom.out = Minus, NumMinus                    ; Zoom camera out (continuous control)
    186187zoom.wheel.in = WheelUp                       ; Zoom camera in (stepped control)
     
    284285garrison = Ctrl              ; Modifier to garrison when clicking on building
    285286autorallypoint = Ctrl        ; Modifier to set the rally point on the building itself
    286287guard = "G"                  ; Modifier to escort/guard when clicking on unit/building
     288repair = "J"                 ; Modifier to repair when clicking on building/mechanical unit
     289unload = "U"                 ; Modifier to unload when building/mechanical unit is selected
    287290queue = Shift                ; Modifier to queue unit orders instead of replacing
    288291batchtrain = Shift           ; Modifier to train units in batches
    289292massbarter = Shift           ; Modifier to barter bunch of resources
  • binaries/data/mods/public/gui/common/color.js

     
    134134{
    135135    let key = Engine.ConfigDB_GetValue("user", "hotkey." + hotkey);
    136136
    137     if (!key)
     137    if (!key || key.toLowerCase() == "unused")
    138138        return "";
    139139
    140140    return sprintf(text, {
  • binaries/data/mods/public/gui/manual/intro.txt

     
    7070. (Period): Select idle worker (including citizen soldiers)
    7171Shift + .: add idle worker to selection (including citizen soldiers)
    7272H: Stop (halt) the currently selected units.
     73U: Unload the garrisoned units of the selected buildings
    7374Ctrl + 1 (and so on up to Ctrl + 0): Create control group 1 (to 0) from the selected units/buildings
    74751 (and so on up to 0): Select the units/buildings in control group 1 (to 0)
    7576Shift + 1 (to 0): Add control group 1 (to 0) to the selected units/buildings
     
    8283
    8384[font="sans-bold-14"]Modify mouse action
    8485[font="sans-14"]Ctrl + Right Click on building: Garrison
     86J + Right Click on building: Repair
    8587Shift + Right Click: Queue the move/build/gather/etc order
    8688Shift + Left click when training unit/s: Add units in batches of five
    8789Shift + Left Click or Left Drag over unit on map: Add unit to selection
  • binaries/data/mods/public/gui/session/hotkeys/camera.xml

     
    55        <action on="Press">setCameraFollow(g_Selection.getFirstSelected());</action>
    66    </object>
    77
     8    <object hotkey="camera.rallypointfocus">
     9        <action on="Press">performCommand(g_Selection.getFirstSelected(), "focus-rally");</action>
     10    </object>
     11
    812    <!-- Camera jumping - press a hotkey to mark a position and another hotkey to jump back there -->
    913    <object hotkey="camera.jump.1">
    1014        <action on="Press">jumpCamera(1);</action>
  • binaries/data/mods/public/gui/session/hotkeys/misc.xml

     
    4646        <action on="Press">performCommand(g_Selection.getFirstSelected(), "delete");</action>
    4747    </object>
    4848
     49    <object hotkey="session.unload">
     50        <action on="Press">unloadAll();</action>
     51    </object>
     52
    4953    <object hotkey="session.stop">
    5054        <action on="Press">stopUnits(g_Selection.toList());</action>
    5155    </object>
  • binaries/data/mods/public/gui/session/unit_actions.js

     
    344344                "target": null
    345345            };
    346346        },
     347        "hotkeyActionCheck": function(target)
     348        {
     349            if (!Engine.HotkeyIsPressed("session.repair") ||
     350                !getActionInfo("repair", target).possible)
     351                return false;
     352
     353            return {
     354                "type": "build",
     355                "cursor": "action-repair",
     356                "target": target
     357            };
     358        },
    347359        "actionCheck": function(target)
    348360        {
    349361            if (!getActionInfo("repair", target).possible)
     
    783795                cursor = "action-attack-move";
    784796            }
    785797
    786             if (targetState.garrisonHolder &&
     798            if (Engine.HotkeyIsPressed("session.repair") && targetState.needsRepair &&
     799                playerCheck(entState, targetState, ["Ally"]))
     800            {
     801                data.command = "repair";
     802                data.target = targetState.id;
     803                cursor = "action-repair";
     804            }
     805            else if (targetState.garrisonHolder &&
    787806                playerCheck(entState, targetState, ["Player", "MutualAlly"]))
    788807            {
    789808                data.command = "garrison";
     
    973992            }
    974993
    975994            return {
    976                 "tooltip": translate("Unload All"),
     995                "tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.unload") +
     996                           translate("Unload All."),
    977997                "icon": "garrison-out.png",
    978998                "count": count,
    979999            };
     
    10881108                return false;
    10891109
    10901110            return {
    1091                 "tooltip": translate("Repair"),
     1111                "tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.repair") +
     1112                           translate("Order the selected units to repair a building or mechanical unit."),
    10921113                "icon": "repair.png"
    10931114            };
    10941115        },
     
    11061127                return false;
    11071128
    11081129            return {
    1109                 "tooltip": translate("Focus on Rally Point"),
     1130                "tooltip": colorizeHotkey("%(hotkey)s" + " ", "camera.rallypointfocus") +
     1131                           translate("Focus on Rally Point."),
    11101132                "icon": "focus-rally.png"
    11111133            };
    11121134        },
     
    12521274            }
    12531275
    12541276            return {
    1255                 "tooltip": translate("Unload All"),
     1277                "tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.unload") +
     1278                           translate("Unload All."),
    12561279                "icon": "garrison-out.png",
    12571280                "count": count,
    12581281            };