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:
Ray Greenwell
2007-11-19 23:37:13 +00:00
parent 6a783e8bc4
commit bffb48d11b
@@ -85,6 +85,22 @@ public class EZGameManager extends GameManager
_winnerOids = winnerOids; _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 * 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. * and that the game is not in play.