Split out announcement of a player elimination to its own function so we can override it for games where normal announcement doesn't make sense.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3790 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -856,9 +856,7 @@ public class GameManager extends PlaceManager
|
||||
// let derived classes do some business
|
||||
playerGameDidEnd(pidx);
|
||||
|
||||
String message = MessageBundle.tcompose(
|
||||
"m.player_game_over", getPlayerName(pidx));
|
||||
systemMessage(GAME_MESSAGE_BUNDLE, message);
|
||||
announcePlayerGameOver(pidx);
|
||||
|
||||
} finally {
|
||||
_gameobj.commitTransaction();
|
||||
@@ -875,6 +873,16 @@ public class GameManager extends PlaceManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Announce to everyone in the game that a player's game has ended.
|
||||
*/
|
||||
protected void announcePlayerGameOver (int pidx)
|
||||
{
|
||||
String message = MessageBundle.tcompose(
|
||||
"m.player_game_over", getPlayerName(pidx));
|
||||
systemMessage(GAME_MESSAGE_BUNDLE, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a player has been marked as knocked out but before the
|
||||
* knock-out status update has been sent to the players. Any status
|
||||
|
||||
Reference in New Issue
Block a user