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:
Michael Bayne
2005-11-10 23:18:58 +00:00
parent 3c91e33f04
commit 176329e1ed
17 changed files with 80 additions and 36 deletions
@@ -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)
{