Add accents
This commit is contained in:
@@ -27,11 +27,46 @@ function doesPlayerHaveAccent(client) {
|
||||
|
||||
function getPlayerAccentInlineOutput(client) {
|
||||
let outputText = "";
|
||||
//if(doesPlayerHaveAccent(client)) {
|
||||
// outputText = `[${getPlayerAccentText(client)}]`;
|
||||
//}
|
||||
if(doesPlayerHaveAccent(client)) {
|
||||
outputText = `[${getPlayerAccentText(client)}] `;
|
||||
}
|
||||
|
||||
return outputText;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setAccentCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let accentId = getAccentFromParams(params);
|
||||
|
||||
if(!accentId) {
|
||||
messagePlayerError(client, "Accent not found!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let accentString = getGlobalConfig().accents[accentId];
|
||||
|
||||
getPlayerCurrentSubAccount(client).accent = accentString;
|
||||
messagePlayerSuccess(client, `You set your accent to ${getInlineChatColourByName("lightGrey")}${accentString}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function listAccentsCommand(command, params, client) {
|
||||
let stationList = getGlobalConfig().accents;
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(stationList, 8);
|
||||
|
||||
messagePlayerInfo(client, `${getInlineChatColourByType("clanOrange")}== ${getInlineChatColourByType("jobYellow")}Accents ${getInlineChatColourByType("clanOrange")}==================================`);
|
||||
|
||||
for(let i in chunkedList) {
|
||||
messagePlayerInfo(client, chunkedList[i].join(", "));
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user