mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
network play: fix for Commander and Tiny Leaders variants
This method is called numerous times, many before the Commander data has been populated on the PlayerView objects. This is reflected a few lines above where similar logic is applied to the current PlayerView. This simply applies similar logic to the player's opponents. Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
@@ -129,6 +129,12 @@ public class PlayerView extends GameEntityView {
|
||||
}
|
||||
|
||||
final FCollectionView<PlayerView> opponents = getOpponents();
|
||||
for (PlayerView opponent: opponents) {
|
||||
if (opponent.getCommanders() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
final List<String> info = Lists.newArrayListWithExpectedSize(opponents.size());
|
||||
info.add(TextUtil.concatWithSpace("Commanders:", Lang.joinHomogenous(commanders)));
|
||||
for (final PlayerView p : Iterables.concat(Collections.singleton(this), opponents)) {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class VLobby implements ILobbyView {
|
||||
private final VariantCheckBox vntArchenemy = new VariantCheckBox(GameType.Archenemy);
|
||||
private final VariantCheckBox vntArchenemyRumble = new VariantCheckBox(GameType.ArchenemyRumble);
|
||||
private final ImmutableList<VariantCheckBox> vntBoxes =
|
||||
ImmutableList.of();
|
||||
ImmutableList.of(vntCommander, vntTinyLeaders);
|
||||
// ImmutableList.of(vntVanguard, vntMomirBasic, vntCommander, vntTinyLeaders, vntPlanechase, vntArchenemy, vntArchenemyRumble);
|
||||
|
||||
// Player frame elements
|
||||
|
||||
Reference in New Issue
Block a user