Files
narya/src/java/com/threerings/crowd/data/BodyObject.dobj
T
Michael Bayne f1ac86936e Be speaker aware. Big brother loves us.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2655 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-14 00:55:40 +00:00

55 lines
1.3 KiB
Plaintext

//
// $Id: BodyObject.dobj,v 1.12 2003/06/14 00:55:40 mdb Exp $
package com.threerings.crowd.data;
import com.threerings.presents.data.ClientObject;
import com.threerings.crowd.chat.data.SpeakObject;
/**
* The basic user object class for Crowd users. Bodies have a username, a
* location and a status.
*/
public class BodyObject extends ClientObject
implements SpeakObject
{
/**
* The username associated with this body object.
*/
public String username;
/**
* The oid of the place currently occupied by this body or -1 if they
* currently occupy no place.
*/
public int location = -1;
/**
* The user's current status ({@link OccupantInfo#ACTIVE}, etc.).
*/
public byte status;
/**
* The time at which the {@link #status} field was last updated. This
* is only available on the server.
*/
public transient long statusTime;
// documentation inherited
public void applyToListeners (ListenerOp op)
{
op.apply(getOid());
}
// documentation inherited
public String who ()
{
StringBuffer buf = new StringBuffer(username);
buf.append(" (").append(getOid());
if (status != OccupantInfo.ACTIVE) {
buf.append(" ").append(OccupantInfo.X_STATUS[status]);
}
return buf.append(")").toString();
}
}