diff --git a/binaries/data/config/default.cfg b/binaries/data/config/default.cfg index 3a52a9ec91..c47699067c 100644 --- a/binaries/data/config/default.cfg +++ b/binaries/data/config/default.cfg @@ -286,6 +286,7 @@ hotkey.session.queue = Shift ; Modifier to queue unit orders inst hotkey.session.batchtrain = Shift ; Modifier to train units in batches hotkey.session.massbarter = Shift ; Modifier to barter bunch of resources hotkey.session.masstribute = Shift ; Modifier to tribute bunch of resources +hotkey.session.fulltradeswap = Shift ; Modifier to put the desired trade resource to 100% hotkey.session.unloadtype = Shift ; Modifier to unload all units of type hotkey.session.deselectgroup = Ctrl ; Modifier to deselect units when clicking group icon, instead of selecting hotkey.session.rotate.cw = RightBracket ; Rotate building placement preview clockwise diff --git a/binaries/data/mods/public/gui/session/menu.js b/binaries/data/mods/public/gui/session/menu.js index afa08b61d8..5525dfd415 100644 --- a/binaries/data/mods/public/gui/session/menu.js +++ b/binaries/data/mods/public/gui/session/menu.js @@ -440,8 +440,13 @@ function openTrade() buttonResource.onpress = (function(resource){ return function() { - if (selec == resource) - return; + if (Engine.HotkeyIsPressed("session.fulltradeswap")) + { + for (var ress of RESOURCES) + proba[ress] = 0; + proba[resource] = 100; + Engine.PostNetworkCommand({"type": "set-trading-goods", "tradingGoods": proba}); + } selec = resource; updateButtons(); } diff --git a/binaries/data/mods/public/gui/session/session.xml b/binaries/data/mods/public/gui/session/session.xml index 1237c80a19..f7ab18788d 100644 --- a/binaries/data/mods/public/gui/session/session.xml +++ b/binaries/data/mods/public/gui/session/session.xml @@ -525,7 +525,7 @@ - Select one goods as origin of the changes, then use the arrows of the target goods to make the changes. + Select one goods as origin of the changes, then use the arrows of the target goods to make the changes (using Shift to select will put the selected resource to 100%).