- Start a game.
- Group some units.
- Make a second group with a part of the first group.
- Verify that the part is not in the first group anymore.
- Flip the switch in the options menu.
- Try again and verify that units can be in multiple control groups.
- Check the replay and verify that the states are equal even when switching the option between successive replays.
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/gui/session/selection.js | 462| » if·(!(Engine.ConfigDB_GetValue("user",·"gui.session.entitiesinmultiplecontrolgroups")·!=·"false")) | | [NORMAL] JSHintBear: | | Confusing use of '!'. Executing section cli...
The tooltip and name must be as transparent as possible, it's probably okay. I think I have to accept this unless you want to change it.
(That's the reason why aligning with spaces is discouraged) (Perhaps we can find a name that is 6 characters shorter without restoring to an abbreviation.)
I don't remember pointing that out, but the double negation is indeed unnecessary indirection.
Abb. [sic] but I'm okay with that.
In the previous situation that would indeed return only one group, however, when changing the option during a game, it could return an array now.
That would indeed be a problem when you'd remove the last entity from a group, since the group would then be removed. Apparently there has been no issues with this before.
Well that's why I suggested filter, not find :)
I would say out of scope to change here?
Yeah totally, just thought it was worth mentionning in case it could actually fail.
usefulGroups = this.groups.filter(group => ent in group.ent); for (let group in usefulGroups) group.remove(ent);
This would also remove the problem with removing groups whilst iterating.