forked from External/mage
Merge pull request 'master' (#26) from External/mage:master into master
All checks were successful
/ build_release (push) Successful in 14m41s
All checks were successful
/ build_release (push) Successful in 14m41s
Reviewed-on: #26
This commit is contained in:
commit
9a2382cd2c
788 changed files with 29882 additions and 3734 deletions
|
|
@ -218,6 +218,22 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
});
|
||||
}
|
||||
|
||||
public List<UUID> getPossibleTargets() {
|
||||
if (options != null && options.containsKey("possibleTargets")) {
|
||||
return (List<UUID>) options.get("possibleTargets");
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
public Set<UUID> getChosenTargets() {
|
||||
if (options != null && options.containsKey("chosenTargets")) {
|
||||
return new HashSet<>((List<UUID>) options.get("chosenTargets"));
|
||||
} else {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
}
|
||||
|
||||
public CardView findCard(UUID id) {
|
||||
return this.allCardsIndex.getOrDefault(id, null);
|
||||
}
|
||||
|
|
@ -658,7 +674,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
// see test render dialog for refresh commands order
|
||||
playPanel.getPlayerPanel().fullRefresh(GUISizeHelper.playerPanelGuiScale);
|
||||
playPanel.init(player, bigCard, gameId, player.getPriorityTimeLeftSecs());
|
||||
playPanel.update(lastGameData.game, player, lastGameData.targets);
|
||||
playPanel.update(lastGameData.game, player, lastGameData.targets, lastGameData.getChosenTargets());
|
||||
playPanel.getPlayerPanel().sizePlayerPanel(false);
|
||||
}
|
||||
});
|
||||
|
|
@ -1186,7 +1202,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
}
|
||||
players.get(player.getPlayerId()).update(lastGameData.game, player, lastGameData.targets);
|
||||
players.get(player.getPlayerId()).update(lastGameData.game, player, lastGameData.targets, lastGameData.getChosenTargets());
|
||||
if (player.getPlayerId().equals(playerId)) {
|
||||
skipButtons.updateFromPlayer(player);
|
||||
}
|
||||
|
|
@ -1802,12 +1818,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
needZone = (Zone) lastGameData.options.get("targetZone");
|
||||
}
|
||||
|
||||
List<UUID> needChosen;
|
||||
if (lastGameData.options != null && lastGameData.options.containsKey("chosenTargets")) {
|
||||
needChosen = (List<UUID>) lastGameData.options.get("chosenTargets");
|
||||
} else {
|
||||
needChosen = new ArrayList<>();
|
||||
}
|
||||
Set<UUID> needChosen = lastGameData.getChosenTargets();
|
||||
|
||||
Set<UUID> needSelectable;
|
||||
if (lastGameData.targets != null) {
|
||||
|
|
@ -2037,7 +2048,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
private void prepareSelectableWindows(
|
||||
Collection<CardInfoWindowDialog> windows,
|
||||
Set<UUID> needSelectable,
|
||||
List<UUID> needChosen,
|
||||
Set<UUID> needChosen,
|
||||
PlayableObjectsList needPlayable
|
||||
) {
|
||||
// lookAt or reveals windows clean up on next priority, so users can see dialogs, but xmage can't restore it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue