Fix the ghost unit turning green when hovering an ennemy structure (#2175)

## Description:

Fix the ghost unit turning green when hovering an ennemy structure

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

DISCORD_USERNAME
This commit is contained in:
Vivacious Box
2025-10-11 10:05:23 -07:00
committed by GitHub
parent b9a4add1ca
commit 843aa11c84
@@ -277,7 +277,9 @@ export class StructureIconsLayer implements Layer {
if (unit.canUpgrade) {
this.potentialUpgrade = this.renders.find(
(r) => r.unit.id() === unit.canUpgrade,
(r) =>
r.unit.id() === unit.canUpgrade &&
r.unit.owner().id() === this.game.myPlayer()?.id(),
);
if (this.potentialUpgrade) {
this.potentialUpgrade.iconContainer.filters = [