From 4415472bef7ce0a865231010f51e7eab27795173 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 24 Nov 2003 18:07:58 +0000 Subject: [PATCH] Allow that warning to be disabled for duty puzzles. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2868 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/parlor/game/GameManager.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/parlor/game/GameManager.java b/src/java/com/threerings/parlor/game/GameManager.java index bc15bd4d8..8ba749938 100644 --- a/src/java/com/threerings/parlor/game/GameManager.java +++ b/src/java/com/threerings/parlor/game/GameManager.java @@ -1,5 +1,5 @@ // -// $Id: GameManager.java,v 1.67 2003/07/16 18:03:30 ray Exp $ +// $Id: GameManager.java,v 1.68 2003/11/24 18:07:58 mdb Exp $ package com.threerings.parlor.game; @@ -555,10 +555,13 @@ public class GameManager extends PlaceManager // make sure everyone has turned up if (!allPlayersReady()) { - Log.warning("Requested to start a game that is still " + - "awaiting players [game=" + _gameobj.which() + - ", pnames=" + StringUtil.toString(_gameobj.players) + - ", poids=" + StringUtil.toString(_playerOids) + "]."); + if (warnOnUnreadyStart()) { + Log.warning( + "Requested to start a game that is still " + + "awaiting players [game=" + _gameobj.which() + + ", pnames=" + StringUtil.toString(_gameobj.players) + + ", poids=" + StringUtil.toString(_playerOids) + "]."); + } return false; } @@ -572,6 +575,16 @@ public class GameManager extends PlaceManager return true; } + /** + * Indicates whether or not we should issue a warning if {@link + * #startGame} is called on a game where all players have not yet + * reported in as ready. + */ + protected boolean warnOnUnreadyStart () + { + return true; + } + /** * Called when the game is about to start, but before the game start * notification has been delivered to the players. Derived classes