Differential D1461 Diff 15205 ps/trunk/binaries/data/mods/public/gui/session/chat/ChatMessageFormatPlayer.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/chat/ChatMessageFormatPlayer.js
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | else | ||||
if (userName != g_PlayerAssignments[msg.guid].name && | if (userName != g_PlayerAssignments[msg.guid].name && | ||||
msg.text.toLowerCase().indexOf(splitRatingFromNick(userName).nick.toLowerCase()) != -1) | msg.text.toLowerCase().indexOf(splitRatingFromNick(userName).nick.toLowerCase()) != -1) | ||||
soundNotification("nick"); | soundNotification("nick"); | ||||
} | } | ||||
// GUID for players, playerID for AIs | // GUID for players, playerID for AIs | ||||
let coloredUsername = msg.guid != -1 ? colorizePlayernameByGUID(msg.guid) : colorizePlayernameByID(msg.player); | let coloredUsername = msg.guid != -1 ? colorizePlayernameByGUID(msg.guid) : colorizePlayernameByID(msg.player); | ||||
return sprintf(translate(this.strings[isMe ? "me" : "regular"][msg.context ? "context" : "no-context"]), { | return { | ||||
"text": sprintf(translate(this.strings[isMe ? "me" : "regular"][msg.context ? "context" : "no-context"]), { | |||||
"message": msg.text, | "message": msg.text, | ||||
"context": msg.context ? translateWithContext("chat message context", msg.context) : "", | "context": msg.context ? translateWithContext("chat message context", msg.context) : "", | ||||
"user": coloredUsername, | "user": coloredUsername, | ||||
"userTag": sprintf(translate("<%(user)s>"), { "user": coloredUsername }) | "userTag": sprintf(translate("<%(user)s>"), { "user": coloredUsername }) | ||||
}); | }) | ||||
}; | |||||
} | } | ||||
/** | /** | ||||
* Checks if the current user is an addressee of the chatmessage sent by another player. | * Checks if the current user is an addressee of the chatmessage sent by another player. | ||||
* Sets the context and potentially addresseeGUID of that message. | * Sets the context and potentially addresseeGUID of that message. | ||||
* Returns true if the message should be displayed. | * Returns true if the message should be displayed. | ||||
*/ | */ | ||||
parseMessageAddressee(msg) | parseMessageAddressee(msg) | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator