Added unit escorting formation!!! (#11057)

* Added escort button

* Added basic escort movement

* Improved escort movement

* Swapping breaks escorting

* Added stop escorting button

* Added link icon to unit

* getDistanceToTiles() now automatically includes escorting

* Multi-turn movement with different units works somewhat

* Escorting units persist to escort across saves

* Escorting units are only idle if their partner unit is idle as well

* Fixed multi-turn escort movement where one unit has more movement points left over

* Added basic tests

* Added a test for formation idle units

* Added some basic movement tests

* Added some canMoveTo tests

* getDistanceToTiles only caches when includeEscort is true

* added getDistanceToTiles test

* An entire commit to remove one line of white space just for you! And yes, there are no semi-colons;

* Added translations

* Added more stopEscorting() calls when the unit is removed

* Added extra comments and refactoring

* Refactored removeAllTilesNotInSet to use a mutableIterator

* Refactored code based on review

* Refactored removing tiles in PathsToTilesWithinTurn that aren't in another PathsToTilesWithinTurn
This commit is contained in:
Oskar Niesen
2024-02-24 14:39:04 -06:00
committed by GitHub
parent 54201c381c
commit 04083de766
7 changed files with 330 additions and 10 deletions

View File

@ -1107,6 +1107,8 @@ Sleep =
Sleep until healed =
Moving =
Set up =
Escort formation =
Stop Escort formation =
Paradrop =
Air Sweep =
Add in capital =