Add getDisplayName for names to be shown in the client.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@755 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -304,6 +304,16 @@ public class GameManager extends PlaceManager
|
|||||||
return (_gameobj == null) ? null : _gameobj.players[index];
|
return (_gameobj == null) ? null : _gameobj.players[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the name that should be shown in the client for the player with the specified index
|
||||||
|
* or null if no player exists at that index. This may be different than their username as
|
||||||
|
* returned by {@link #getPlayerName}, which is the player's unique name in the server.
|
||||||
|
*/
|
||||||
|
public Name getPlayerDisplayName (int index)
|
||||||
|
{
|
||||||
|
return getPlayerName(index);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the player index of the given user in the game, or <code>-1</code> if the player is
|
* Returns the player index of the given user in the game, or <code>-1</code> if the player is
|
||||||
* not involved in the game.
|
* not involved in the game.
|
||||||
@@ -1168,7 +1178,7 @@ public class GameManager extends PlaceManager
|
|||||||
protected void announcePlayerGameOver (int pidx)
|
protected void announcePlayerGameOver (int pidx)
|
||||||
{
|
{
|
||||||
systemMessage(GAME_MESSAGE_BUNDLE,
|
systemMessage(GAME_MESSAGE_BUNDLE,
|
||||||
MessageBundle.tcompose(getPlayerGameOverMessage(pidx), getPlayerName(pidx)));
|
MessageBundle.tcompose(getPlayerGameOverMessage(pidx), getPlayerDisplayName(pidx)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user