mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 12:51:30 +00:00
alternate view: make trade ships yellow when destined for ally port
This commit is contained in:
@@ -428,8 +428,13 @@ export class UnitLayer implements Layer {
|
||||
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;
|
||||
const myPlayer = this.game.myPlayer();
|
||||
if (myPlayer != null) {
|
||||
if (myPlayer == target) {
|
||||
rel = Relationship.Self;
|
||||
} else if (myPlayer.isFriendly(target)) {
|
||||
rel = Relationship.Ally;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (rel) {
|
||||
|
||||
Reference in New Issue
Block a user