This commit is contained in:
Benjamin Kyd
2021-04-18 18:38:00 +01:00
parent 0282337c4c
commit 89b2b1c3aa
4 changed files with 44012 additions and 8 deletions

View File

@@ -118,7 +118,7 @@ function createLobby()
{
const errorDiv = document.createElement('div');
errorDiv.id = 'lobby-error';
errorDiv.innerHTML = localeString('error-bold') + localeString('error-lobby-name-required');
errorDiv.innerHTML = localeString('error-bold') + ' ' + localeString('error-lobby-name-required');
errorDiv.classList.add('red');
CreateLobbyBlock.appendChild(errorDiv);
return;
@@ -162,10 +162,10 @@ socket.on('lobby-create-error', obj => {
const errorDiv = document.createElement('div');
errorDiv.id = 'lobby-error';
errorDiv.innerHTML = localeString('error-bold') + localeString('error-creating-lobby') + ' ' + JSON.stringify(args);
errorDiv.innerHTML = localeString('error-bold') + ' ' + localeString('error-creating-lobby') + ' ' + JSON.stringify(args);
errorDiv.classList.add('red');
CreateLobbyBlock.appendChild(errorDiv);
pageLog(localeString('error-bold') + localeString('error-creating-lobby') + ' ' + JSON.stringify(args));
pageLog(localeString('error-bold') + ' ' + localeString('error-creating-lobby') + ' ' + JSON.stringify(args));
});
@@ -178,7 +178,7 @@ function joinLobby()
{
const errorDiv = document.createElement('div');
errorDiv.id = 'lobby-error';
errorDiv.innerHTML = localeString('error-bold') + localeString('error-lobby-id-required');
errorDiv.innerHTML = localeString('error-bold') + ' ' + localeString('error-lobby-id-required');
errorDiv.classList.add('red');
JoinLobbyBlock.appendChild(errorDiv);
return;
@@ -223,10 +223,10 @@ socket.on('lobby-join-error', obj => {
const errorDiv = document.createElement('div');
errorDiv.id = 'lobby-error';
errorDiv.innerHTML = localeString('error-bold') + localeString('error-lobby-joining') + ' ' + JSON.stringify(obj);
errorDiv.innerHTML = localeString('error-bold') + ' ' + + localeString('error-lobby-joining') + ' ' + JSON.stringify(obj);
errorDiv.classList.add('red');
JoinLobbyBlock.appendChild(errorDiv);
pageLog(localeString('error-bold') + localeString('error-lobby-joining') + ' ' + JSON.stringify(obj));
pageLog(localeString('error-bold') + ' ' + + localeString('error-lobby-joining') + ' ' + JSON.stringify(obj));
});

43998
data/pt-dictionary.dict Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -48,6 +48,7 @@ function StartGame(lobby)
// populate users tile drawer
ActiveGames[lobby.uid] = {
lobbyuid: lobby.uid,
locale: gameowner.locale,
@@ -65,6 +66,12 @@ function ExchangeTiles(tileset, tilesToExchange)
}
// does not alter tileset
function SelectTilesFromBag(tileset, num)
{
}
module.exports = {
StartGame: StartGame,

View File

@@ -143,8 +143,7 @@ function ClientIdentify(socket, args)
{
socket.emit('identify-success', {connected: true, user: user});
return;
}
else if (status === 'error-taken-user-connection')
} else if (status === 'error-taken-user-connection')
{
err.addError(500, 'Internal Server Error', 'error-taken-user-connection');
socket.emit('identify-error', err.toError);