mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 17:56:43 +00:00
show incoming tradeships as green in alternate view
This commit is contained in:
@@ -425,7 +425,13 @@ export class UnitLayer implements Layer {
|
||||
let alternateViewColor = null;
|
||||
|
||||
if (this.alternateView) {
|
||||
const rel = this.relationship(unit);
|
||||
let rel = this.relationship(unit);
|
||||
if (unit.type() == UnitType.TradeShip && unit.dstPortId() != null) {
|
||||
const target = this.game.unit(unit.dstPortId())?.owner();
|
||||
if (this.game.myPlayer() != null && this.game.myPlayer() == target) {
|
||||
rel = Relationship.Self;
|
||||
}
|
||||
}
|
||||
switch (rel) {
|
||||
case Relationship.Self:
|
||||
alternateViewColor = this.theme.selfColor();
|
||||
|
||||
Reference in New Issue
Block a user