Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/gamedescription.js
Show All 19 Lines | |||||
*/ | */ | ||||
function splitRatingFromNick(playerName) | function splitRatingFromNick(playerName) | ||||
{ | { | ||||
let result = /^(\S+)\ \((\d+)\)$/g.exec(playerName); | let result = /^(\S+)\ \((\d+)\)$/g.exec(playerName); | ||||
return { "nick": result ? result[1] : playerName, "rating": result ? +result[2] : "" }; | return { "nick": result ? result[1] : playerName, "rating": result ? +result[2] : "" }; | ||||
} | } | ||||
/** | /** | ||||
* Create multiplayer name from username and config multiplayer name if they different. | |||||
*/ | |||||
function multiplayerName(username) | |||||
{ | |||||
let multiplayerName = Engine.ConfigDB_GetValue("user", "playername.multiplayer"); | |||||
return !username ? multiplayerName : multiplayerName != username ? multiplayerName + " (" + username + ")" : username; | |||||
} | |||||
/** | |||||
* Array of playernames that the current user has marked as buddies. | * Array of playernames that the current user has marked as buddies. | ||||
*/ | */ | ||||
var g_Buddies = Engine.ConfigDB_GetValue("user", "lobby.buddies").split(g_BuddyListDelimiter); | var g_Buddies = Engine.ConfigDB_GetValue("user", "lobby.buddies").split(g_BuddyListDelimiter); | ||||
/** | /** | ||||
* Denotes which players are a lobby buddy of the current user. | * Denotes which players are a lobby buddy of the current user. | ||||
*/ | */ | ||||
var g_BuddySymbol = '•'; | var g_BuddySymbol = '•'; | ||||
▲ Show 20 Lines • Show All 411 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator