Merge pull request #143 from ilan-schemoul/warship-target

feat: WarShips red color outside if target current player
This commit is contained in:
evanpelle
2025-03-04 15:53:47 -08:00
committed by GitHub
6 changed files with 38 additions and 9 deletions
+1
View File
@@ -110,6 +110,7 @@ export class WarshipExecution implements Execution {
return distSortUnit(this.mg, this.warship)(a, b);
})[0] ?? null;
this.warship.setTarget(this.target);
if (this.target == null || this.target.type() != UnitType.TradeShip) {
// Patrol unless we are hunting down a tradeship
const result = this.pathfinder.nextTile(