mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Some fixes to player handling.
This commit is contained in:
parent
526a93df7e
commit
6420666668
4 changed files with 14 additions and 14 deletions
|
@ -569,8 +569,12 @@ public class PlayAreaPanel extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
public void setMenuStates(boolean manaPoolAutomatic, boolean manaPoolAutomaticRestricted) {
|
||||
manaPoolMenuItem1.setSelected(manaPoolAutomatic);
|
||||
manaPoolMenuItem2.setSelected(manaPoolAutomaticRestricted);
|
||||
if (manaPoolMenuItem1 != null) {
|
||||
manaPoolMenuItem1.setSelected(manaPoolAutomatic);
|
||||
}
|
||||
if (manaPoolMenuItem2 != null) {
|
||||
manaPoolMenuItem2.setSelected(manaPoolAutomaticRestricted);
|
||||
}
|
||||
}
|
||||
|
||||
private mage.client.game.BattlefieldPanel battlefieldPanel;
|
||||
|
|
|
@ -602,8 +602,8 @@ public class GameController implements GameCallback {
|
|||
if (grantingPlayer.isHuman()) {
|
||||
GameSessionPlayer gameSession = gameSessions.get(userIdGranter);
|
||||
if (gameSession != null) {
|
||||
UUID requestingPlayer = getPlayerId(userIdRequester);
|
||||
if (requestingPlayer == null || !requestingPlayer.equals(grantingPlayer.getId())) { // don't allow request for your own cards
|
||||
UUID requestingPlayerId = getPlayerId(userIdRequester);
|
||||
if (requestingPlayerId == null || !requestingPlayerId.equals(grantingPlayer.getId())) { // don't allow request for your own cards
|
||||
if (grantingPlayer.isRequestToShowHandCardsAllowed()) {
|
||||
gameSession.requestPermissionToSeeHandCards(userIdRequester);
|
||||
} else {
|
||||
|
|
|
@ -209,7 +209,6 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
protected Set<UUID> playersUnderYourControl = new HashSet<>();
|
||||
|
||||
protected Set<UUID> usersAllowedToSeeHandCards = new HashSet<>();
|
||||
protected boolean requestsAllowedToSeeHandCards = true;
|
||||
|
||||
protected List<UUID> attachments = new ArrayList<>();
|
||||
|
||||
|
@ -3113,7 +3112,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean isRequestToShowHandCardsAllowed() {
|
||||
return userData.allowRequestShowHandCards();
|
||||
return userData.isAllowRequestShowHandCards();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,6 +28,7 @@ public class UserData implements Serializable {
|
|||
this.userSkipPrioritySteps = userSkipPrioritySteps;
|
||||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
this.flagName = flagName;
|
||||
this.askMoveToGraveOrder = askMoveToGraveOrder;
|
||||
}
|
||||
|
||||
public void setGroupId(int groupId) {
|
||||
|
@ -50,20 +51,16 @@ public class UserData implements Serializable {
|
|||
return showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public boolean isAllowRequestShowHandCards() {
|
||||
return allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public void setShowAbilityPickerForced(boolean showAbilityPickerForced) {
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) {
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
public boolean isAllowRequestShowHandCards() {
|
||||
return allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public boolean allowRequestShowHandCards() {
|
||||
return allowRequestShowHandCards;
|
||||
public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) {
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public UserSkipPrioritySteps getUserSkipPrioritySteps() {
|
||||
|
|
Loading…
Reference in a new issue