Send a chat message to the game when players request a rematch.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@502 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -85,6 +85,22 @@ public class EZGameManager extends GameManager
|
||||
_winnerOids = winnerOids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playerReady (BodyObject caller)
|
||||
{
|
||||
// if we're rematching...
|
||||
if (!_ezObj.isInPlay() && (_ezObj.roundId != 0)) {
|
||||
// report to the other players that this player requested a rematch
|
||||
int pidx = _ezObj.getPlayerIndex(caller.getVisibleName());
|
||||
if (pidx != -1 && _playerOids[pidx] == 0) {
|
||||
systemMessage(GAME_MESSAGE_BUNDLE,
|
||||
MessageBundle.tcompose("m.requested_rematch", caller.getVisibleName()));
|
||||
}
|
||||
}
|
||||
|
||||
super.playerReady(caller);
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirms that the caller can end the game (or restart it). Requires that they are a player
|
||||
* and that the game is not in play.
|
||||
|
||||
Reference in New Issue
Block a user