forked from External/mage
* UI: improved hand request dialog (users can ask your hand once per game, reset it by re-activate button);
This commit is contained in:
parent
a18c3e1d88
commit
9a9b304fd5
8 changed files with 82 additions and 59 deletions
|
|
@ -2284,6 +2284,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
break;
|
||||
case PERMISSION_REQUESTS_ALLOWED_ON:
|
||||
userData.setAllowRequestShowHandCards(true);
|
||||
userData.resetRequestedHandPlayersList(game.getId()); // users can send request again
|
||||
break;
|
||||
}
|
||||
logger.trace("PASS Priority: " + playerAction.toString());
|
||||
|
|
@ -3969,8 +3970,13 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isRequestToShowHandCardsAllowed() {
|
||||
return userData.isAllowRequestShowHandCards();
|
||||
public boolean isPlayerAllowedToRequestHand(UUID gameId, UUID requesterPlayerId) {
|
||||
return userData.isAllowRequestHandToPlayer(gameId, requesterPlayerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPlayerToRequestedHandList(UUID gameId, UUID requesterPlayerId) {
|
||||
userData.addPlayerToRequestedHandList(gameId, requesterPlayerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue