Missed some bits.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2879 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-11-26 02:07:45 +00:00
parent 104763ac88
commit 5424a66006
3 changed files with 29 additions and 38 deletions
@@ -1,5 +1,5 @@
// //
// $Id: PuzzleBoardView.java,v 1.1 2003/11/26 01:42:34 mdb Exp $ // $Id: PuzzleBoardView.java,v 1.2 2003/11/26 02:07:45 mdb Exp $
package com.threerings.puzzle.client; package com.threerings.puzzle.client;
@@ -26,7 +26,8 @@ import com.threerings.media.image.Mirage;
import com.threerings.media.sprite.Sprite; import com.threerings.media.sprite.Sprite;
import com.threerings.media.sprite.SpriteManager; import com.threerings.media.sprite.SpriteManager;
import com.threerings.yohoho.client.YoUI; // import com.threerings.yohoho.client.YoUI;
import com.threerings.puzzle.Log; import com.threerings.puzzle.Log;
import com.threerings.puzzle.client.ScoreAnimation; import com.threerings.puzzle.client.ScoreAnimation;
import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.Board;
@@ -91,17 +92,17 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
*/ */
public void setPaused (boolean paused) public void setPaused (boolean paused)
{ {
if (paused) { // if (paused) {
_pauseLabel = new Label( // _pauseLabel = new Label(
YoUI.puzzle.getBundle().get(_pctrl.getPauseString()), // YoUI.puzzle.getBundle().get(_pctrl.getPauseString()),
Label.BOLD | Label.OUTLINE, Color.WHITE, Color.BLACK, // Label.BOLD | Label.OUTLINE, Color.WHITE, Color.BLACK,
_fonts[_fonts.length - 2]); // _fonts[_fonts.length - 2]);
_pauseLabel.setTargetWidth(_bounds.width); // _pauseLabel.setTargetWidth(_bounds.width);
_pauseLabel.layout(this); // _pauseLabel.layout(this);
} else { // } else {
_pauseLabel = null; // _pauseLabel = null;
} // }
repaint(); // repaint();
} }
/** /**
@@ -1,5 +1,5 @@
// //
// $Id: DropBoardView.java,v 1.1 2003/11/26 01:42:34 mdb Exp $ // $Id: DropBoardView.java,v 1.2 2003/11/26 02:07:45 mdb Exp $
package com.threerings.puzzle.drop.client; package com.threerings.puzzle.drop.client;
@@ -17,14 +17,12 @@ import com.samskivert.swing.Label;
import com.threerings.media.image.Mirage; import com.threerings.media.image.Mirage;
import com.threerings.media.sprite.Sprite; import com.threerings.media.sprite.Sprite;
import com.threerings.yohoho.client.YoUI;
import com.threerings.puzzle.util.PuzzleContext;
import com.threerings.puzzle.Log; import com.threerings.puzzle.Log;
import com.threerings.puzzle.client.PuzzleBoardView; import com.threerings.puzzle.client.PuzzleBoardView;
import com.threerings.puzzle.client.ScoreAnimation; import com.threerings.puzzle.client.ScoreAnimation;
import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.Board;
import com.threerings.puzzle.data.PuzzleConfig; import com.threerings.puzzle.data.PuzzleConfig;
import com.threerings.puzzle.util.PuzzleContext;
import com.threerings.puzzle.drop.data.DropBoard; import com.threerings.puzzle.drop.data.DropBoard;
import com.threerings.puzzle.drop.data.DropConfig; import com.threerings.puzzle.drop.data.DropConfig;
@@ -1,5 +1,5 @@
// //
// $Id: PuzzleManager.java,v 1.1 2003/11/26 01:42:34 mdb Exp $ // $Id: PuzzleManager.java,v 1.2 2003/11/26 02:07:45 mdb Exp $
package com.threerings.puzzle.server; package com.threerings.puzzle.server;
@@ -23,6 +23,7 @@ import com.threerings.presents.server.util.SafeInterval;
import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.data.OccupantInfo; import com.threerings.crowd.data.OccupantInfo;
import com.threerings.crowd.server.CrowdServer;
import com.threerings.crowd.server.PlaceManagerDelegate; import com.threerings.crowd.server.PlaceManagerDelegate;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.GameManager;
@@ -33,13 +34,6 @@ import com.threerings.util.MessageBundle;
import com.threerings.util.RandomUtil; import com.threerings.util.RandomUtil;
import com.threerings.util.StreamableArrayList; import com.threerings.util.StreamableArrayList;
import com.threerings.yohoho.data.ActivityCodes;
import com.threerings.yohoho.data.YoOccupantInfo;
import com.threerings.crowd.data.BodyObject;
import com.threerings.yohoho.server.PirateManager;
import com.threerings.yohoho.server.YoSceneManager;
import com.threerings.yohoho.server.YoServer;
import com.threerings.puzzle.Log; import com.threerings.puzzle.Log;
import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.Board;
import com.threerings.puzzle.data.BoardSummary; import com.threerings.puzzle.data.BoardSummary;
@@ -75,11 +69,11 @@ public abstract class PuzzleManager extends GameManager
// if we have their oid, use that // if we have their oid, use that
int ploid = _playerOids[playerIdx]; int ploid = _playerOids[playerIdx];
if (ploid > 0) { if (ploid > 0) {
return (BodyObject)YoServer.omgr.getObject(ploid); return (BodyObject)CrowdServer.omgr.getObject(ploid);
} }
// otherwise look them up by name // otherwise look them up by name
String name = getPlayerName(playerIdx); String name = getPlayerName(playerIdx);
return (name == null) ? null : (BodyObject)YoServer.lookupBody(name); return (name == null) ? null : CrowdServer.lookupBody(name);
} }
/** /**
@@ -266,7 +260,8 @@ public abstract class PuzzleManager extends GameManager
if (_uiid == -1 && statusInterval > 0) { if (_uiid == -1 && statusInterval > 0) {
// register the status update interval to address subsequent // register the status update interval to address subsequent
// periodic updates // periodic updates
_uiid = IntervalManager.register(new SafeInterval(YoServer.omgr) { _uiid = IntervalManager.register(
new SafeInterval(CrowdServer.omgr) {
public void run () { public void run () {
sendStatusUpdate(); sendStatusUpdate();
} }
@@ -437,7 +432,7 @@ public abstract class PuzzleManager extends GameManager
// now send a message event to each room // now send a message event to each room
for (int ii=0, nn = places.size(); ii < nn; ii++) { for (int ii=0, nn = places.size(); ii < nn; ii++) {
DObject place = YoServer.omgr.getObject(places.get(ii)); DObject place = CrowdServer.omgr.getObject(places.get(ii));
if (place != null) { if (place != null) {
place.postMessage(WINNERS_AND_LOSERS, args); place.postMessage(WINNERS_AND_LOSERS, args);
} }
@@ -453,7 +448,7 @@ public abstract class PuzzleManager extends GameManager
OidList knocky = new OidList(1); OidList knocky = new OidList(1);
knocky.add(user.getOid()); knocky.add(user.getOid());
DObject place = YoServer.omgr.getObject(user.location); DObject place = CrowdServer.omgr.getObject(user.location);
if (place != null) { if (place != null) {
place.postMessage(PLAYER_KNOCKED_OUT, new Object[] { knocky }); place.postMessage(PLAYER_KNOCKED_OUT, new Object[] { knocky });
} }
@@ -473,9 +468,6 @@ public abstract class PuzzleManager extends GameManager
// clear out our service registration // clear out our service registration
_invmgr.clearDispatcher(_puzobj.puzzleGameService); _invmgr.clearDispatcher(_puzobj.puzzleGameService);
// clear out our status indicator
YoServer.status.removeFromPuzzles(new Integer(_puzobj.getOid()));
} }
/** /**
@@ -593,7 +585,7 @@ public abstract class PuzzleManager extends GameManager
if (_puzobj.state != PuzzleObject.GAME_OVER) { if (_puzobj.state != PuzzleObject.GAME_OVER) {
// inform remaining users that the user left // inform remaining users that the user left
BodyObject user = (BodyObject)YoServer.omgr.getObject(bodyOid); BodyObject user = (BodyObject)CrowdServer.omgr.getObject(bodyOid);
if (user != null) { if (user != null) {
systemMessage(MessageBundle.tcompose( systemMessage(MessageBundle.tcompose(
"m.user_left", user.username)); "m.user_left", user.username));