Simplify joining a Sokko TCG group and let a test player open one locally
- On the local dev server, a test player can open a group on one of its destinations, with the 20 s test trip; it departs by itself after 5 minutes, since only the creator may launch it. - While a player chooses their card to join, the expedition planner is hidden; Cancel brings it back. - Joining and readying are one button, "Valider et se mettre en prêt", at the bottom right of the loadout frame, also after "Modifier ma préparation", which now sits next to "Quitter l'expédition". - The redundant "you are ready" block is gone: the member list already shows the Ready badge. - The card a player sends is called their explorer in the texts about that role. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
82cebd0fd1
commit
8eb7f2e53e
12 changed files with 196 additions and 88 deletions
|
|
@ -310,8 +310,9 @@ export function cancelExpedition(expeditionId) {
|
|||
return request(`/admin/expeditions/${encodeURIComponent(expeditionId)}/cancel`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function joinExpedition(expeditionId, { editionId }) {
|
||||
return request(`/expeditions/${encodeURIComponent(expeditionId)}/join`, { method: "POST", body: JSON.stringify({ editionId }) });
|
||||
// `ready` : le joueur valide sa carte et se dit prêt en rejoignant.
|
||||
export function joinExpedition(expeditionId, { editionId, ready = false }) {
|
||||
return request(`/expeditions/${encodeURIComponent(expeditionId)}/join`, { method: "POST", body: JSON.stringify({ editionId, ready }) });
|
||||
}
|
||||
|
||||
// Aperçu d'une inscription : exigences et résultat attendu du groupe avec la carte choisie.
|
||||
|
|
@ -329,6 +330,11 @@ export function addTestPlayer(expeditionId) {
|
|||
return request(`/expeditions/${encodeURIComponent(expeditionId)}/test-player`, { method: "POST" });
|
||||
}
|
||||
|
||||
// Serveur Vite local uniquement : un joueur de test ouvre une expédition, à rejoindre.
|
||||
export function openTestGroup() {
|
||||
return request("/expeditions/test-group", { method: "POST" });
|
||||
}
|
||||
|
||||
export function leaveExpedition(expeditionId) {
|
||||
return request(`/expeditions/${encodeURIComponent(expeditionId)}/leave`, { method: "POST" });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue