This commit is contained in:
Scott Anderson
2025-08-24 21:32:32 -04:00
parent eaefecb00f
commit 809d60ff58
95 changed files with 1385 additions and 1424 deletions
+2 -2
View File
@@ -159,8 +159,8 @@ export class UnitGrid {
if (!unit.isActive()) continue;
const distSquared = this.squaredDistanceFromTile(unit, tile);
if (distSquared > rangeSquared) continue;
// eslint-disable-next-line sort-keys
const value = { unit, distSquared };
const value = { distSquared, unit };
if (predicate !== undefined && !predicate(value)) continue;
nearby.push(value);
}