Moved standard puzzle chat up to the game level, so that all games

can broadcast chat messages on their object..


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3237 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2004-11-25 00:21:46 +00:00
parent 284494d296
commit 90621e78de
9 changed files with 50 additions and 31 deletions
@@ -1,5 +1,5 @@
//
// $Id: PuzzleController.java,v 1.20 2004/11/12 20:03:35 ray Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -258,9 +258,6 @@ public abstract class PuzzleController extends GameController
{
super.willEnterPlace(plobj);
// register the puzzle object's chat
_pctx.getChatDirector().addAuxiliarySource(plobj, PUZZLE_CHAT_TYPE);
// get a casted reference to our puzzle object
_puzobj = (PuzzleObject)plobj;
_puzobj.addListener(_kolist);
@@ -298,9 +295,6 @@ public abstract class PuzzleController extends GameController
// clean up and clear out
clearAction();
// unregister the puzzle object's chat
_pctx.getChatDirector().removeAuxiliarySource(plobj);
// stop listening to key events..
_pctx.getKeyDispatcher().removeGlobalKeyListener(_globalKeyListener);
@@ -334,14 +328,6 @@ public abstract class PuzzleController extends GameController
return true;
}
/**
* A way for controllers to display a puzzle-related system message.
*/
public void systemMessage (String bundle, String msg)
{
_pctx.getChatDirector().displayInfo(bundle, msg, PUZZLE_CHAT_TYPE);
}
// documentation inherited
public void attributeChanged (AttributeChangedEvent event)
{
@@ -1,5 +1,5 @@
//
// $Id: PuzzleCodes.java,v 1.6 2004/10/28 19:20:27 mdb Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -31,9 +31,6 @@ public interface PuzzleCodes extends InvocationCodes
/** The message bundle identifier for general puzzle messages. */
public static final String PUZZLE_MESSAGE_BUNDLE = "puzzle.general";
/** The ID for puzzle chat. */
public static final String PUZZLE_CHAT_TYPE = "puzzleChat";
/** The default puzzle difficulty level. */
public static final int DEFAULT_DIFFICULTY = 2;
@@ -1,5 +1,5 @@
//
// $Id: PuzzleContext.java,v 1.5 2004/08/27 02:20:33 mdb Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -29,7 +29,6 @@ import com.threerings.util.Name;
import com.threerings.media.FrameManager;
import com.threerings.media.sound.SoundManager;
import com.threerings.crowd.chat.client.ChatDirector;
import com.threerings.parlor.util.ParlorContext;
/**
@@ -66,9 +65,4 @@ public interface PuzzleContext extends ParlorContext
* Provides access to the sound manager.
*/
public SoundManager getSoundManager ();
/**
* Provides access to the chat director.
*/
public ChatDirector getChatDirector ();
}