Fix plan-driven unit tracking leaks and TradeShipExecution fallthrough

- Delete unit IDs from `planDrivenUnitIds` in `GameImpl.removeUnit`
- Return early on `PathStatus.COMPLETE`/`NOT_FOUND` in `TradeShipExecution.tick` to avoid post-delete motion-plan logic
This commit is contained in:
scamiv
2026-02-25 04:10:35 +01:00
parent a067c5f7d5
commit 0cfbd3bd0c
+2 -2
View File
@@ -124,14 +124,14 @@ export class TradeShipExecution implements Execution {
break;
case PathStatus.COMPLETE:
this.complete();
break;
return;
case PathStatus.NOT_FOUND:
console.warn("captured trade ship cannot find route");
if (this.tradeShip.isActive()) {
this.tradeShip.delete(false);
}
this.active = false;
break;
return;
}
const dst = this._dstPort.tile();