@@ -82,23 +82,26 @@ void UpdateGui()
8282 }
8383 else if ( pw . Mode == PwMatchCommand . ModeType . Defend )
8484 {
85- PwMatchCommand . VoteOption opt = pw . Options . First ( ) ;
86- headerLabel . Text = string . Format ( "{0} attacks planet {2}, {1} defends" ,
85+ headerLabel . Text = string . Format ( "{0} attacks, {1} defends" ,
8786 pw . AttackerFaction ,
88- string . Join ( "," , pw . DefenderFactions ) ,
89- opt . PlanetName ) ;
87+ string . Join ( "," , pw . DefenderFactions ) ) ;
9088
9189 foreach ( Button c in pnl . Controls . OfType < Button > ( ) . ToList ( ) ) pnl . Controls . Remove ( c ) ;
9290
93- var but = new Button { Text = string . Format ( "{0} [{1}/{2}]" , opt . PlanetName , opt . Count , opt . Needed ) , AutoSize = true } ;
94- Program . ToolTip . SetMap ( but , opt . Map ) ;
95-
96- if ( pw . DefenderFactions . Contains ( tas . MyUser . Faction ) ) // NOTE this is for cases where nightwatch self faction info is delayed
91+ foreach ( PwMatchCommand . VoteOption opt in pw . Options )
9792 {
98- AddButtonClick ( opt , but ) ;
93+ Program . Downloader . GetResource ( DownloadType . MAP , opt . Map ) ;
94+
95+ var but = new Button { Text = string . Format ( "{0} [{1}/{2}]" , opt . PlanetName , opt . Count , opt . Needed ) , AutoSize = true } ;
96+ Program . ToolTip . SetMap ( but , opt . Map ) ;
97+
98+ if ( pw . DefenderFactions . Contains ( tas . MyUser . Faction ) )
99+ {
100+ AddButtonClick ( opt , but ) ;
101+ }
102+ else but . Enabled = false ;
103+ pnl . Controls . Add ( but ) ;
99104 }
100- else but . Enabled = false ;
101- pnl . Controls . Add ( but ) ;
102105 }
103106
104107 Program . NotifySection . AddBar ( this ) ;
0 commit comments