Autoplace fixes + PWA fixes

This commit is contained in:
MaciejkaG 2024-04-14 00:23:59 +02:00
parent 81b77d42de
commit ad81684431
8 changed files with 56 additions and 15 deletions

View File

@ -917,21 +917,21 @@ function checkFlag(key) {
async function finishPrepPhase(socket, playerGame) {
await GInfo.endPrepPhase(socket);
// const members = [...roomMemberIterator(playerGame.id)];
// for (let i = 0; i < members.length; i++) {
// const sid = members[i][0];
// const socket = io.sockets.sockets.get(sid);
const members = [...roomMemberIterator(playerGame.id)];
for (let i = 0; i < members.length; i++) {
const sid = members[i][0];
const socket = io.sockets.sockets.get(sid);
// let placedShips = await GInfo.depleteShips(socket);
// placedShips.forEach(shipData => {
// socket.emit("placed ship", shipData)
// });
let placedShips = await GInfo.depleteShips(socket);
placedShips.forEach(shipData => {
socket.emit("placed ship", shipData)
});
// if (placedShips.length > 0) {
// const locale = new Lang(socket.session.langs);
// socket.emit("toast", locale.t("board.Your remaining ships have been randomly placed"))
// }
// }
if (placedShips.length > 0) {
const locale = new Lang(socket.session.langs);
socket.emit("toast", locale.t("board.Your remaining ships have been randomly placed"))
}
}
GInfo.timer(playerGame.id, 30, () => {
AFKEnd(playerGame.id);

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,5 +1,6 @@
{
"name": "Statki",
"description": "The #1 online multiplayer battleships game\nModern, simple UI, PvP and PvE modes, advanced statistics and more.",
"start_url": "/",
"background_color": "black",
"theme_color": "black",
@ -7,8 +8,48 @@
"icons": [
{
"src": "/assets/img/statki-logo-crop.png",
"sizes": "1080x1080",
"type": "image/png"
"sizes": "1080x1080"
},
{
"src": "/assets/img/statki-logo-crop-144.png",
"sizes": "144x144"
}
],
"screenshots": [
{
"src": "/assets/img/screenshot_game2.png",
"sizes": "1920x911",
"type": "image/png",
"form_factor": "wide",
"label": "Middle of the round"
},
{
"src": "/assets/img/screenshot_mainmenu.png",
"sizes": "1920x911",
"type": "image/png",
"form_factor": "wide",
"label": "Main menu"
},
{
"src": "/assets/img/screenshot_create.png",
"sizes": "1920x911",
"type": "image/png",
"form_factor": "wide",
"label": "Create game screen"
},
{
"src": "/assets/img/screenshot_profile.png",
"sizes": "1920x911",
"type": "image/png",
"form_factor": "wide",
"label": "Main menu"
},
{
"src": "/assets/img/screenshot_game1.png",
"sizes": "1920x911",
"type": "image/png",
"form_factor": "wide",
"label": "Preparation phase"
}
],
"display": "standalone"