Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1226 closed enhancement (fixed)

[PATCH] Queue train units via hotkeys

Reported by: Marco Amadori Owned by: Jonathan Waller
Priority: Should Have Milestone: Alpha 12
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

It would be nice if it would be possible to train multiple units from all selected units/building that can produce units via a simple keypress (eventually with SHIFT to batch queue).

I have a patch that enables that in a probably naive way.

Attachments (2)

0001-Hotkeys-for-training-units-out-of-selected-buildings.patch (5.5 KB ) - added by Marco Amadori 12 years ago.
PATCH: Hotkeys for training units out of selected buildings
0001-Hotkeys-for-training-units-out-of-selected-buildings.2.patch (5.5 KB ) - added by Marco Amadori 12 years ago.
Refreshed Patch to r11393

Download all attachments as: .zip

Change History (15)

by Marco Amadori, 12 years ago

PATCH: Hotkeys for training units out of selected buildings

comment:1 by Marco Amadori, 12 years ago

Summary: Queue train units via hotkeys[PATCH] Queue train units via hotkeys

comment:2 by Marco Amadori, 12 years ago

Keywords: review added
Milestone: BacklogAlpha 10

comment:3 by Marco Amadori, 12 years ago

Keywords: patch, review → patch review

comment:4 by historic_bruno, 12 years ago

I think this would be more useful in combination with a complete build/train/research hotkey system, probably we'll want to discuss this and come up with a complete list before implementing them piecemeal. By "complete" I mean one hotkey will select the building, the next will select the unit, etc.

Maybe start a topic on the forum and we can start flushing out a list of suitable hotkeys?

comment:5 by Kieran P, 12 years ago

Keywords: patch review → patch, review

by Marco Amadori, 12 years ago

Refreshed Patch to r11393

in reply to:  4 comment:6 by Marco Amadori, 12 years ago

Replying to historic_bruno:

Maybe start a topic on the forum and we can start flushing out a list of suitable hotkeys?

Done here.

comment:7 by Kieran P, 12 years ago

Keywords: patch, review → patch review
Milestone: Alpha 10Alpha 11

comment:8 by picobyte, 12 years ago

I've created a hotkeys patch in ticket #1492, but I didn't read this topic yet at that time.

comment:9 by Kieran P, 12 years ago

Milestone: Alpha 11Alpha 12

comment:10 by Jonathan Waller, 11 years ago

Owner: set to Jonathan Waller
Resolution: fixed
Status: newclosed

In 12861:

Unit training hotkeys from mammadori. Fixes #1226.

comment:11 by Jonathan Waller, 11 years ago

Keywords: review removed

Thank you for the patch, sorry about the ridiculous amount of time it took to get this reviewed. It generally seemed to be a good approach.

There were some merge conflicts due to the time lag which included the change so that when multiple buildings are selected all the trainable units are shown. This required some largish modifications. Your previous code had a problem that if you selected two different buildings then it would train the 2nd unit from both which is not what a user would expect, the changes for the merge fixed this. I added some more hotkeys to allow for the extra units being shown.

I also made the code read the hotkeys from the config so that if the user changes then they will be shown correctly in the tooltip.

comment:12 by Erik Johansson, 11 years ago

Could someone who's worked on this (i.e. either mammadori or quantumstate preferably) please add the default hotkeys to the Hotkeys page of the wiki manual? :) So we make sure to keep the documentation updated :)

comment:13 by Jonathan Waller, 11 years ago

Thanks for the reminder, done.

Note: See TracTickets for help on using tickets.