Various updates to allow a system where a user's visible name is not the same
as their authentication name (which we leave in BodyObject.username). This turns out to be simpler than the system we adopted for Yohoho wherein we replace the player's user object after they select a character, but converting to this sort of system is way more work than would be worth it. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3758 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -51,7 +51,9 @@ public class BodyObject extends ClientObject
|
||||
// AUTO-GENERATED: FIELDS END
|
||||
|
||||
/**
|
||||
* The username associated with this body object.
|
||||
* The username associated with this body object. This should not be used
|
||||
* directly; in general {@link #getVisibleName} should be used unless you
|
||||
* specifically know that you want the username.
|
||||
*/
|
||||
public Name username;
|
||||
|
||||
@@ -109,6 +111,15 @@ public class BodyObject extends ClientObject
|
||||
return EMPTY_TOKENS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name that should be displayed to other users and used for
|
||||
* the chat system. The default is to use {@link #username}.
|
||||
*/
|
||||
public Name getVisibleName ()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void applyToListeners (ListenerOp op)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user