OpenRA/OpenRA — pull request #4918 by cjshmyr (2014-03-20 05:05:55+00:00)
Title: Chronotank group teleportation (PR remake)

- Original Chronotank order generator was cleaned up (still exists).
- Added an order targeter to Chronotank which allows players to hold `Shift` or `Alt` and issue a move order to teleport (multiple tanks selected means group teleportation).
- Updated the Teleport activity to pick the next best destination cell if the target location is invalid (bad terrain type, already occupied, or out of range). This applies to ctnk teleports and the chronosphere return trip only. However there are some limitations of Teleport due to `WorldUtils.MaxRange`.
- Modders cannot specify a `MaxDistance` greater than 50 for ctnk, however they can remove the limit altogether with `DistanceLimit: false`. An exception is thrown if modders try to do this (with a helpful message).
- When searching for the destination teleport cell, another radius search for valid cells is done. If no appropriate cells are found within radius (before `MaxDistance` or `WorldUtils.MaxRange`, whatever comes first), the unit won't teleport. This is only a problem on the return chronosphere trip, and that would literally require a radius of 50 cells that are invalid from the original chrono destination.