From bffb48d11b82ade708e00571240ab7cbc5d0d000 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 19 Nov 2007 23:37:13 +0000 Subject: [PATCH] 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 --- .../threerings/ezgame/server/EZGameManager.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/java/com/threerings/ezgame/server/EZGameManager.java b/src/java/com/threerings/ezgame/server/EZGameManager.java index a212a257..5c49dddc 100644 --- a/src/java/com/threerings/ezgame/server/EZGameManager.java +++ b/src/java/com/threerings/ezgame/server/EZGameManager.java @@ -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.