#2407 closed enhancement (fixed)
[PATCH] Selecting only idling units
Reported by: | Oimat | Owned by: | Itms |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 18 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description (last modified by )
#1598 and #1989 would allow having a wide range of way to select units. I propose to add the following:
- Pressing '.' while selecting units with the mouse, select only the idle workers.
- Pressing '/' while selecting units with the mouse, select only the idle military units.
(See HotKeys)
That would be very usefull for selecting workers that finished a metal mine and are waiting too close to the women (farming), near the first cc for example.
If the other patchs mentionned above are included too, that would allow to select 3 idling females that are waiting near the cc to create a new farm, and infinite other possibilities
Attachments (4)
Change History (17)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 11 years ago
comment:4 by , 10 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:5 by , 10 years ago
There is a crypic comment inside the selection code: (gui/session/input.js)
// TODO: Should we handle "control all units" here as well?
Apparently it refers to a requested feature. Does anyone know more about that?
(Answered on IRC)
by , 10 years ago
Attachment: | refactor _selection_v1.diff added |
---|
comment:6 by , 10 years ago
The attached patch version 1 refactors the unit selection code to be more general. It does not actually address the FR #2407 yet. For that I would like to use infrastructure provided by #2357 which may or may not come in the near future.
Please provide criticism. Should I remove the caching in input.js:482? (For Code readability)
comment:7 by , 10 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 18 |
Summary: | Selecting only idling units → [PATCH] Selecting only idling units |
by , 10 years ago
Attachment: | refactor_selection_v4.diff added |
---|
Created the diff of the patch from revision 15892.
comment:8 by , 10 years ago
Just to be clear, what the current patch „v4“ does, and what it doesn't.
- It refactors the unit filter mechanic, to make it more versatile.
- It fixes a bug, where the preview under the bandbox does not actually match the units which will be selected in the end.
- It adds a hotkey I, to select only IDLE units. (This is most likely not a good choice, but the most obvious one)
But what is doesn't do:
- Fix the bug where the selection preview is not updated when hotkeys change.
- Fix the bug where units running into (or out of) the box don't update their selection status.
I do intend to overhaul that loop, as I suggested in #2826. That should make the whole mechanism easier to maintain and understand.
by , 10 years ago
Attachment: | refactor_selection_v5.diff added |
---|
comment:9 by , 10 years ago
Hello rolf, I modified a bit your patch to make it work with the current SVN and I moved some bits of code to make it clearer. Please tell me if you agree with my changes, and after that I'll test for bugs and look into committing it.
Thanks for working on it :)
by , 10 years ago
Attachment: | refactor_selection_tweaked.patch added |
---|
actually working version (with re-updated structure)
See #2357 for a definition of worker units.
idle_worker_blink_v12.patch:
Units are defined in binaries/data/mods/public/simulation/templates/special/player.xml.