Instead of using this hack with the modified template name (e.g. p3&foo) everywhere, now EntityGroups uses this "extended" template name only internally as key to sort by owner and template. So nothing besides EntityGroups needs to know about how this key is constructed.
Fixes #4425. refs #1807, #4167.
Fixes rP18979
Details
- Reviewers
mimo - Commits
- rP19202: Properly sort selected entities by owner
Tested entity selection groups, adding and removing enitities from a group.
Tested control groups.
Set a rallypoint on a huntable animal, train a unit. The unit should move to the animal and kill/gather it.
Alt+doubleclick on some units like women, traders and military units (since that was broken in one of the predecessors of rP18979)
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Build is green
Updating workspaces. Build (release)... Build (debug)... Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/308/ for more details.
The selectionGroupName is lost with this patch. That is used when we want units with different templates to be grouped together (typically to group basic, advanced and elite units). I've noticed two places where changes are needed, but there may be more.
binaries/data/mods/public/gui/session/selection.js | ||
---|---|---|
66 ↗ | (On Diff #443) | shouldn't it be key = "p" + ... + "&" + key; as we want to keep the selectionGroupName if any (so that basic, advanced and elite are grouped together). |
binaries/data/mods/public/gui/session/selection_panels.js | ||
459 ↗ | (On Diff #443) | I think you should do add and use that in 461 |
Looks good to me now. Thanks, that will solve a longstanding issue!
I'll do some tests and accept it later.
binaries/data/mods/public/gui/session/selection.js | ||
---|---|---|
51 ↗ | (On Diff #448) | not necessary for the patch, but as you modify this function, we could have "if (this.ents[ent]) continue;" here |
binaries/data/mods/public/gui/session/selection_panels.js | ||
940 ↗ | (On Diff #448) | missing semicolon |
Build is green
Updating workspaces. Build (release)... Build (debug)... Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/311/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/323/ for more details.