Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/gamedescription.js
/** | /** | ||||
* Highlights the victory condition in the game-description. | * Highlights the victory condition in the game-description. | ||||
*/ | */ | ||||
var g_DescriptionHighlight = "orange"; | var g_DescriptionHighlight = "orange"; | ||||
/** | /** | ||||
* The rating assigned to lobby players who didn't complete a ranked 1v1 yet. | * The rating assigned to lobby players who didn't complete a ranked 1v1 yet. | ||||
*/ | */ | ||||
var g_DefaultLobbyRating = 1200; | var g_DefaultLobbyRating = 1200; | ||||
/** | |||||
* XEP-0172 doesn't restrict nicknames, but our lobby policy does. | |||||
* So use this human readable delimiter to separate buddy names in the config file. | |||||
*/ | |||||
var g_BuddyListDelimiter = ","; | |||||
/** | /** | ||||
* Returns the nickname without the lobby rating. | * Returns the nickname without the lobby rating. | ||||
*/ | */ | ||||
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] : "" }; | ||||
} | } | ||||
/** | /** | ||||
* 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_ConfigListDelimiter); | ||||
/** | /** | ||||
* 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 = '•'; | ||||
/** | /** | ||||
* Returns map description and preview image or placeholder. | * Returns map description and preview image or placeholder. | ||||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator