byte'd chat mode code
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1600 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ChatDirector.java,v 1.26 2002/07/22 22:26:26 ray Exp $
|
// $Id: ChatDirector.java,v 1.27 2002/07/22 22:54:03 ray Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.chat;
|
package com.threerings.crowd.chat;
|
||||||
|
|
||||||
@@ -351,18 +351,19 @@ public class ChatDirector
|
|||||||
}
|
}
|
||||||
|
|
||||||
String bundle = null;
|
String bundle = null;
|
||||||
String message, mode;
|
String message;
|
||||||
|
byte mode;
|
||||||
|
|
||||||
// determine whether this speak message originated from another
|
// determine whether this speak message originated from another
|
||||||
// client or from a server entity
|
// client or from a server entity
|
||||||
if (args.length == 3) {
|
if (args.length == 3) {
|
||||||
message = (String)args[1];
|
message = (String)args[1];
|
||||||
mode = (String) args[2];
|
mode = ((Byte) args[2]).byteValue();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
bundle = (String)args[1];
|
bundle = (String)args[1];
|
||||||
message = (String)args[2];
|
message = (String)args[2];
|
||||||
mode = (String) args[3];
|
mode = ((Byte) args[3]).byteValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
// pass this on to our chat displays
|
// pass this on to our chat displays
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ChatDisplay.java,v 1.11 2002/07/22 22:26:26 ray Exp $
|
// $Id: ChatDisplay.java,v 1.12 2002/07/22 22:54:03 ray Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.chat;
|
package com.threerings.crowd.chat;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ public interface ChatDisplay
|
|||||||
*/
|
*/
|
||||||
public void displaySpeakMessage (
|
public void displaySpeakMessage (
|
||||||
String type, String speaker, String bundle, String message,
|
String type, String speaker, String bundle, String message,
|
||||||
String mode);
|
byte mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to display a tell message. A tell message is one that is
|
* Called to display a tell message. A tell message is one that is
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ChatCodes.java,v 1.8 2002/07/22 22:26:26 ray Exp $
|
// $Id: ChatCodes.java,v 1.9 2002/07/22 22:54:03 ray Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.chat;
|
package com.threerings.crowd.chat;
|
||||||
|
|
||||||
@@ -46,15 +46,15 @@ public interface ChatCodes extends InvocationCodes
|
|||||||
public static final String TELL_NOTIFICATION = "Tell";
|
public static final String TELL_NOTIFICATION = "Tell";
|
||||||
|
|
||||||
/** The default mode used by speak requests. */
|
/** The default mode used by speak requests. */
|
||||||
public static final String DEFAULT_MODE = "default";
|
public static final byte DEFAULT_MODE = 0;
|
||||||
|
|
||||||
/** The think mode to indicate that the user is thinking
|
/** The think mode to indicate that the user is thinking
|
||||||
* what they're saying, or is it that they're saying what they're
|
* what they're saying, or is it that they're saying what they're
|
||||||
* thinking? */
|
* thinking? */
|
||||||
public static final String THINK_MODE = "think";
|
public static final byte THINK_MODE = 1;
|
||||||
|
|
||||||
/** The mode to indicate that a speak is actually an emote. */
|
/** The mode to indicate that a speak is actually an emote. */
|
||||||
public static final String EMOTE_MODE = "emote";
|
public static final byte EMOTE_MODE = 2;
|
||||||
|
|
||||||
/** An error code delivered when the user targeted for a tell
|
/** An error code delivered when the user targeted for a tell
|
||||||
* notification is not online. */
|
* notification is not online. */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ChatProvider.java,v 1.11 2002/07/22 22:26:26 ray Exp $
|
// $Id: ChatProvider.java,v 1.12 2002/07/22 22:54:03 ray Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.chat;
|
package com.threerings.crowd.chat;
|
||||||
|
|
||||||
@@ -106,13 +106,13 @@ public class ChatProvider
|
|||||||
*/
|
*/
|
||||||
public static void sendChatMessage (
|
public static void sendChatMessage (
|
||||||
int placeOid, String speaker, String bundle, String message,
|
int placeOid, String speaker, String bundle, String message,
|
||||||
String mode)
|
byte mode)
|
||||||
{
|
{
|
||||||
Object[] outargs = null;
|
Object[] outargs = null;
|
||||||
if (bundle == null) {
|
if (bundle == null) {
|
||||||
outargs = new Object[] { speaker, message, mode };
|
outargs = new Object[] { speaker, message, new Byte(mode) };
|
||||||
} else {
|
} else {
|
||||||
outargs = new Object[] { speaker, bundle, message, mode };
|
outargs = new Object[] { speaker, bundle, message, new Byte(mode) };
|
||||||
}
|
}
|
||||||
MessageEvent nevt = new MessageEvent(
|
MessageEvent nevt = new MessageEvent(
|
||||||
placeOid, ChatService.SPEAK_NOTIFICATION, outargs);
|
placeOid, ChatService.SPEAK_NOTIFICATION, outargs);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ChatPanel.java,v 1.16 2002/07/22 22:26:26 ray Exp $
|
// $Id: ChatPanel.java,v 1.17 2002/07/22 22:54:04 ray Exp $
|
||||||
|
|
||||||
package com.threerings.micasa.client;
|
package com.threerings.micasa.client;
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ public class ChatPanel
|
|||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
public void displaySpeakMessage (
|
public void displaySpeakMessage (
|
||||||
String type, String speaker, String bundle, String message, String mode)
|
String type, String speaker, String bundle, String message, byte mode)
|
||||||
{
|
{
|
||||||
// wrap the speaker in brackets
|
// wrap the speaker in brackets
|
||||||
speaker = "<" + speaker + "> ";
|
speaker = "<" + speaker + "> ";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotSceneDirector.java,v 1.15 2002/07/22 22:26:26 ray Exp $
|
// $Id: SpotSceneDirector.java,v 1.16 2002/07/22 22:54:04 ray Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.client;
|
package com.threerings.whirled.spot.client;
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ public class SpotSceneDirector
|
|||||||
* @return true if a cluster speak message was delivered, false if we
|
* @return true if a cluster speak message was delivered, false if we
|
||||||
* are not in a valid cluster and refused to deliver the request.
|
* are not in a valid cluster and refused to deliver the request.
|
||||||
*/
|
*/
|
||||||
public boolean requestClusterSpeak (String message, String mode)
|
public boolean requestClusterSpeak (String message, byte mode)
|
||||||
{
|
{
|
||||||
// make sure we're currently in a scene
|
// make sure we're currently in a scene
|
||||||
DisplaySpotScene scene = (DisplaySpotScene)_scdir.getScene();
|
DisplaySpotScene scene = (DisplaySpotScene)_scdir.getScene();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotService.java,v 1.9 2002/07/22 22:26:26 ray Exp $
|
// $Id: SpotService.java,v 1.10 2002/07/22 22:54:04 ray Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.client;
|
package com.threerings.whirled.spot.client;
|
||||||
|
|
||||||
@@ -56,11 +56,12 @@ public class SpotService implements SpotCodes
|
|||||||
*/
|
*/
|
||||||
public static void clusterSpeak (
|
public static void clusterSpeak (
|
||||||
Client client, int sceneId, int locationId, String message,
|
Client client, int sceneId, int locationId, String message,
|
||||||
String mode, SpotSceneDirector rsptarget)
|
byte mode, SpotSceneDirector rsptarget)
|
||||||
{
|
{
|
||||||
InvocationDirector invdir = client.getInvocationDirector();
|
InvocationDirector invdir = client.getInvocationDirector();
|
||||||
Object[] args = new Object[] {
|
Object[] args = new Object[] {
|
||||||
new Integer(sceneId), new Integer(locationId), message, mode };
|
new Integer(sceneId), new Integer(locationId), message,
|
||||||
|
new Byte(mode) };
|
||||||
invdir.invoke(MODULE_NAME, CLUSTER_SPEAK_REQUEST, args, rsptarget);
|
invdir.invoke(MODULE_NAME, CLUSTER_SPEAK_REQUEST, args, rsptarget);
|
||||||
Log.debug("Sent clusterSpeak request [sceneId=" + sceneId +
|
Log.debug("Sent clusterSpeak request [sceneId=" + sceneId +
|
||||||
", locId=" + locationId + ", message=" + message + "].");
|
", locId=" + locationId + ", message=" + message + "].");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotProvider.java,v 1.11 2002/07/22 22:26:26 ray Exp $
|
// $Id: SpotProvider.java,v 1.12 2002/07/22 22:54:04 ray Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.server;
|
package com.threerings.whirled.spot.server;
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ public class SpotProvider extends InvocationProvider
|
|||||||
*/
|
*/
|
||||||
public void handleClusterSpeakRequest (
|
public void handleClusterSpeakRequest (
|
||||||
BodyObject source, int invid, int sceneId, int locId, String message,
|
BodyObject source, int invid, int sceneId, int locId, String message,
|
||||||
String mode)
|
byte mode)
|
||||||
{
|
{
|
||||||
sendClusterChatMessage(sceneId, locId, source.getOid(),
|
sendClusterChatMessage(sceneId, locId, source.getOid(),
|
||||||
source.username, null, message, mode);
|
source.username, null, message, mode);
|
||||||
@@ -222,7 +222,7 @@ public class SpotProvider extends InvocationProvider
|
|||||||
*/
|
*/
|
||||||
public static void sendClusterChatMessage (
|
public static void sendClusterChatMessage (
|
||||||
int sceneId, int locId, int speakerOid, String speaker,
|
int sceneId, int locId, int speakerOid, String speaker,
|
||||||
String bundle, String message, String mode)
|
String bundle, String message, byte mode)
|
||||||
{
|
{
|
||||||
// look up the scene manager for the specified scene
|
// look up the scene manager for the specified scene
|
||||||
SpotSceneManager smgr = (SpotSceneManager)
|
SpotSceneManager smgr = (SpotSceneManager)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotSceneManager.java,v 1.14 2002/07/22 22:26:26 ray Exp $
|
// $Id: SpotSceneManager.java,v 1.15 2002/07/22 22:54:04 ray Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.server;
|
package com.threerings.whirled.spot.server;
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ public class SpotSceneManager extends SceneManager
|
|||||||
*/
|
*/
|
||||||
protected void handleClusterSpeakRequest (
|
protected void handleClusterSpeakRequest (
|
||||||
int sourceOid, String source, int locationId,
|
int sourceOid, String source, int locationId,
|
||||||
String bundle, String message, String mode)
|
String bundle, String message, byte mode)
|
||||||
{
|
{
|
||||||
// make sure this user occupies the specified location
|
// make sure this user occupies the specified location
|
||||||
int locidx = _sscene.getLocationIndex(locationId);
|
int locidx = _sscene.getLocationIndex(locationId);
|
||||||
|
|||||||
Reference in New Issue
Block a user