Files
source/Tactical
AsdowandGitHub b8a870df02 Reduce code duplication (#233)
* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Add direction utility function

We have a lot of places in the code that calculate direction based on center cell coordinates, but lack a utility function for it similar to other direction methods.

* Use utility function for calculating direction

* Use ConvertGridNoToCenterCellXY

* Use utility function for direction

* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Remove CenterX & CenterY functions

Use ConvertGridNoToCenterCellXY instead

* Remove CenterX & CenterY calls from UB configuration

* Address review feedback

* Remove duplicate function

ConvertGridNoToCenterCellXY and ConvertMapPosToWorldTileCenter do the exact same thing

* Use PythSpacesAway instead of GetRangeFromGridNoDiff

Both functions calculate the same thing

* Remove GetRangeFromGridNoDiff

* Remove calls to abs()

The values end up being squared anyways making these unnecessary
2023-10-07 15:14:15 +03:00
..
2023-10-07 15:14:15 +03:00
2023-01-03 15:51:48 +02:00
2023-01-19 00:13:08 +02:00
2023-01-22 23:35:08 +02:00
2023-01-14 02:08:39 -03:00
2020-06-17 22:27:20 +00:00
2020-06-25 22:42:44 +00:00
2023-01-03 15:51:48 +02:00
2023-10-03 15:20:36 +03:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-19 00:13:08 +02:00
2023-10-07 15:14:15 +03:00
2017-09-13 20:01:48 +00:00
2023-10-07 15:14:15 +03:00
2023-01-19 00:13:08 +02:00
2023-10-07 15:14:15 +03:00
2023-10-07 15:14:15 +03:00
2023-10-07 15:14:15 +03:00
2023-01-19 00:13:08 +02:00
2016-04-24 19:59:25 +00:00
2023-01-19 00:13:08 +02:00
2023-01-03 15:51:48 +02:00
2023-10-07 15:14:15 +03:00
2023-01-22 23:35:08 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2022-01-16 13:59:59 +00:00
2023-10-07 15:14:15 +03:00
2023-10-07 15:14:15 +03:00
2022-01-26 01:02:30 +00:00
2023-01-03 15:51:48 +02:00
2023-10-07 15:14:15 +03:00
2016-04-24 19:59:25 +00:00
2023-10-07 15:14:15 +03:00
2023-10-07 15:14:15 +03:00
2023-01-19 00:13:08 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-19 00:13:08 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00