We have an idle worker hotkey and an idle warrior hotkey, but this isn't always ideal. For example, I usually use the idle worker hotkey but when I play as Briton that omits the dog, which means I sometimes completely forget about him. I could use the idle warrior hotkey, but then I'd miss women, so I'd have to alternate between using both hotkeys. (Setting both to the same key doesn't really work.) And both hotkeys miss some units, like healers. So it'd be nice if there was a hotkey to select idle units regardless of type.
Details
- Reviewers
wraitii elexis - Commits
- rP20578: Idle unit hotkey.
We could define g_UnitTypes = ["!Domestic"] instead, not sure if that would be preferred.
var g_WorkerTypes = ["FemaleCitizen", "Trader", "FishingBoat", "CitizenSoldier"]; var g_MilitaryTypes = ["Melee", "Ranged"];
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Eventually simulation templates could have one or more hotkey identifiers, so that users can do whatever.
Everyone should be able to type something like S->W to select a woman and B->H to build a house - without creation of a second place that stores information about templates.
Might still need the default.cfg entries (and json descriptions for hotkey files once I have committed those), but that shouldn't really hurt.
So ok for me to add a variety of hotkeys. We shouldn't needlessly restrict the user.
(Unless we have a different hotkey that already does exactly the same. I didn't check if Imaroks hotkey mentioned in D1056 is similar or equal)
We can also always add hotkeys that are by default UNUSED if we run into key assignment issues as the hotkeys will be fully configurable (...once I committed that).
Is it only me, my config or can't we add one idle unit to the current selection?
What do you mean?
Added intro.txt changes.
BackSlash currently isn't used as a hotkey, so I think it's okay.
Successful build - Chance fights ever on the side of the prudent.
Updating workspaces... Build (release)... Build (debug)... Running release tests... Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
Tested, works as advertized, including excluding animals.
Thanks for the patch.
As a reward you may edit the wiki page on your own ;)
binaries/data/mods/public/gui/session/hotkeys/misc.xml | ||
---|---|---|
94 ↗ | (On Diff #4516) | bit confusing to have two idle worker hotkeys in this file and one idle worker hotkey in the minimap_panel.xml. |
(Maybe instead of 3 "next idle unit" hotkeys, we could also have only one and rely on the military / non-military / other existing unit filters. Maybe not, because it's easier to assign the variants if there are more hotkeys.)