Revamped the way BodyObject.location is tracked. Now we use an object which can
be extended to contain the sceneId by Whirled (Vilya's Whirled, though also Whirled Whirled by extension) so that we don't end up with problems where BodyObject.location changes but BodyObject.sceneId remains stale. This won't impact Yohoho because the Yohoho client is always in a scene, it uses a separate mechanism to track games, whereas Whirled's natural usage is to move between scenes and non-scenes. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4779 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -24,7 +24,6 @@ package com.threerings.crowd.chat.data {
|
||||
import flash.utils.getTimer; // function import
|
||||
|
||||
import com.threerings.util.ClassUtil;
|
||||
import com.threerings.util.Long;
|
||||
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
@@ -42,8 +41,8 @@ public /*abstract*/ class ChatMessage
|
||||
/** The bundle to use when translating this message. */
|
||||
public var bundle :String;
|
||||
|
||||
/** The client side 'localtype' of this chat, set to the type
|
||||
* registered with an auxiliary source in the ChatDirector. */
|
||||
/** The client side 'localtype' of this chat, set to the type registered with an auxiliary
|
||||
* source in the ChatDirector. */
|
||||
public var localtype :String;
|
||||
|
||||
/** The client time that this message was created. */
|
||||
@@ -67,14 +66,6 @@ public /*abstract*/ class ChatMessage
|
||||
timestamp = getTimer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the appropriate message format for this message.
|
||||
*/
|
||||
public function getFormat () :String
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a string representation of this instance.
|
||||
*/
|
||||
@@ -84,6 +75,14 @@ public /*abstract*/ class ChatMessage
|
||||
" [message=" + message + ", bundle=" + bundle + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the appropriate message format for this message.
|
||||
*/
|
||||
public function getFormat () :String
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
|
||||
@@ -30,19 +30,16 @@ import com.threerings.io.ObjectOutputStream;
|
||||
*/
|
||||
public class SystemMessage extends ChatMessage
|
||||
{
|
||||
/** Attention level constant to indicate that this message is merely
|
||||
* providing the user with information. */
|
||||
/** Attention level constant to indicate that this message is merely providing the user with
|
||||
* information. */
|
||||
public static const INFO :int = 0;
|
||||
|
||||
/** Attention level constant to indicate that this message is the
|
||||
* result of a user action. */
|
||||
/** Attention level constant to indicate that this message is the result of a user action. */
|
||||
public static const FEEDBACK :int = 1;
|
||||
|
||||
/** Attention level constant to indicate that some action is required. */
|
||||
public static const ATTENTION :int = 2;
|
||||
|
||||
//----
|
||||
|
||||
/** The attention level of this message. */
|
||||
public var attentionLevel :int;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
package com.threerings.crowd.chat.data {
|
||||
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.util.Name;
|
||||
|
||||
/**
|
||||
@@ -34,7 +36,7 @@ public class TellFeedbackMessage extends UserMessage
|
||||
public function TellFeedbackMessage (target :Name, message :String, failed :Boolean = false)
|
||||
{
|
||||
super(target, null, message);
|
||||
_failed = failed;
|
||||
_failure = failed;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,14 +44,28 @@ public class TellFeedbackMessage extends UserMessage
|
||||
*/
|
||||
public function isFailure () :Boolean
|
||||
{
|
||||
return _failed;
|
||||
return _failure;
|
||||
}
|
||||
|
||||
override public function getFormat () :String
|
||||
{
|
||||
return _failed ? null : "m.told_format";
|
||||
return _failure ? null : "m.told_format";
|
||||
}
|
||||
|
||||
protected var _failed :Boolean;
|
||||
// from interface Streamable
|
||||
override public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
_failure = ins.readBoolean();
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
override public function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
super.writeObject(out);
|
||||
out.writeBoolean(_failure);
|
||||
}
|
||||
|
||||
protected var _failure :Boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,7 @@ import com.threerings.io.ObjectOutputStream;
|
||||
*/
|
||||
public class UserSystemMessage extends SystemMessage
|
||||
{
|
||||
/** The "speaker" of this message, the user that triggered that this
|
||||
* message be sent to us. */
|
||||
/** The "speaker" of this message, the user that triggered that this message be sent to us. */
|
||||
public var speaker :Name;
|
||||
|
||||
/**
|
||||
@@ -48,6 +47,7 @@ public class UserSystemMessage extends SystemMessage
|
||||
this.speaker = sender;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
override public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
super.readObject(ins);
|
||||
|
||||
Reference in New Issue
Block a user