mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-18 17:53:29 +00:00
Fix: Nuking an Ally that is Disconnected shows a Red background ghost. Shouldn't be Red as not a Betrayal (#2988)
## Description: Previous behavior: https://youtu.be/Lv0RuBYh9qw?t=1359 New behavior: https://github.com/user-attachments/assets/acfcc4f0-157e-44a0-be28-802927a3c787 ## 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: FloPinguin
This commit is contained in:
@@ -270,8 +270,8 @@ export class StructureIconsLayer implements Layer {
|
|||||||
myPlayer &&
|
myPlayer &&
|
||||||
(nukeType === UnitType.AtomBomb || nukeType === UnitType.HydrogenBomb)
|
(nukeType === UnitType.AtomBomb || nukeType === UnitType.HydrogenBomb)
|
||||||
) {
|
) {
|
||||||
// Only check if player has allies
|
// Only check connected allies - nuking disconnected allies doesn't cause a traitor debuff
|
||||||
const allies = myPlayer.allies();
|
const allies = myPlayer.allies().filter((a) => !a.isDisconnected());
|
||||||
if (allies.length > 0) {
|
if (allies.length > 0) {
|
||||||
targetingAlly = wouldNukeBreakAlliance({
|
targetingAlly = wouldNukeBreakAlliance({
|
||||||
game: this.game,
|
game: this.game,
|
||||||
|
|||||||
Reference in New Issue
Block a user