diff --git a/edge/server/main.js b/edge/server/main.js index 91c7ea3..0343a67 100644 --- a/edge/server/main.js +++ b/edge/server/main.js @@ -76,7 +76,7 @@ function setFixures() { var obj = initTile(ctx, { _id: "b9", position: 11, tiletype: "bar", size:"small", name: "Le comptoir des bières", price: "4", img: "https://lh3.googleusercontent.com/p/AF1QipPRj-YgeXsNxXjkpxill-QMSh20T9jeNl8OLcuj=s1600-w640" }); var obj = initTile(ctx, { _id: "b10", position: 12, tiletype: "bar", size:"small", name: "Les moulins bleus", price: "4", img: "https://www.brunnenbraeu.org/Alben2/MoulinsBleusDijon/album/slides/Les%20Moulins%20Bleus%20%E2%80%93%20Craft%20Beer%20and%20Food%20%281%29.jpg" }); var obj = initTile(ctx, { _id: "b11", position: 13, tiletype: "bar", size:"small", name: "Le fourquet", price: "4", img: "https://media-cdn.tripadvisor.com/media/photo-s/0c/ce/ca/87/le-fourquet.jpg" }); - var obj = initTile(ctx, { _id: "prs", position: 14, tiletype: "prison", size:"big", name: "Cellule de dégrisement", img: "https://lvdneng.rosselcdn.net/sites/default/files/dpistyles_v2/ena_16_9_extra_big/2022/09/05/node_1224621/55601340/public/2022/09/05/B9732002324Z.1_20220905182824_000%2BGBHL6LBT5.1-0.jpg?itok=UqmdxUiM1662450019" }); + var obj = initTile(ctx, { _id: "prs", position: 14, tiletype: "prison", size:"big", name: "Cellule de dégrisement", sound: "/medias/sound/goat.mp3", img: "https://lvdneng.rosselcdn.net/sites/default/files/dpistyles_v2/ena_16_9_extra_big/2022/09/05/node_1224621/55601340/public/2022/09/05/B9732002324Z.1_20220905182824_000%2BGBHL6LBT5.1-0.jpg?itok=UqmdxUiM1662450019" }); var obj = initTile(ctx, { _id: "b12", position: 15, tiletype: "bar", size:"small", name: "Au beaux fûts", price: "5", img: "https://because-gus.com/wp-content/uploads/2020/02/Bars-MaryRebeccaElliott.jpg" }); var obj = initTile(ctx, { _id: "b13", position: 16, tiletype: "bar", size:"small", name: "Le Bacchus", price: "5", img: "https://media-cdn.tripadvisor.com/media/photo-s/10/f6/a8/75/facade.jpg" }); var obj = initTile(ctx, { _id: "b14", position: 17, tiletype: "bar", size:"small", name: "Matusalém", price: "5", img: "https://foodforthought.com.my/wp-content/uploads/Franks-Bar-Matusalem-Rum-x-Franks-Food-For-Thought-1024x731.jpeg" }); diff --git a/src/routes/game/+page.svelte b/src/routes/game/+page.svelte index 0dbde9d..d7d5c7a 100644 --- a/src/routes/game/+page.svelte +++ b/src/routes/game/+page.svelte @@ -113,7 +113,11 @@ break; case "moved": - + + if(data.party.playertile.sound) { + var audio = new Audio("./medias/sound/goat.mp3"); + audio.play(); + } break; } }