fix boat trail on alternate view

This commit is contained in:
Evan
2025-04-15 20:56:58 -07:00
parent 8658fd0ff9
commit 4e2f61a792
+12 -2
View File
@@ -203,6 +203,18 @@ export class UnitLayer implements Layer {
?.[GameUpdateType.Unit]?.forEach((unit) => {
this.onUnitEvent(this.game.unit(unit.id));
});
this.boatToTrail.forEach((trail, unit) => {
for (const t of trail) {
this.paintCell(
this.game.x(t),
this.game.y(t),
this.relationship(unit),
this.theme.territoryColor(unit.owner()),
150,
this.transportShipTrailContext,
);
}
});
}
private relationship(unit: UnitView): Relationship {
@@ -365,8 +377,6 @@ export class UnitLayer implements Layer {
}
private handleTradeShipEvent(unit: UnitView) {
const rel = this.relationship(unit);
// Clear previous area
for (const t of this.game.bfs(
unit.lastTile(),