Improve character suggestions and serve pools from the API

This commit is contained in:
2026-09-04 19:58:35 -07:00
parent 1dac2141e6
commit 0ae1701b82
11 changed files with 255 additions and 1255 deletions
+11 -11
View File
@@ -113,18 +113,18 @@
async function skipCharacterCreation() {
// Suggested values for everyone's free-text fields; the backend only
// applies them to fields players haven't filled in themselves.
const fills = {};
for (const p of state.players) {
fills[p.id] = {
avatar_look: getSuggestion('look'),
avatar_smell: getSuggestion('smell'),
first_words: getSuggestion('first_words'),
good_at_math: getSuggestion('good_at_math'),
like: getSuggestion('like'),
hate: getSuggestion('hate'),
};
}
try {
const fills = {};
for (const p of state.players) {
fills[p.id] = {
avatar_look: await getSuggestion('look'),
avatar_smell: await getSuggestion('smell'),
first_words: await getSuggestion('first_words'),
good_at_math: await getSuggestion('good_at_math'),
like: await getSuggestion('like'),
hate: await getSuggestion('hate'),
};
}
await apiRequest(`/game/${gameId}/player/${playerId}/skip-character-creation`, 'POST', {
fills: JSON.stringify(fills)
});