Improve character suggestions and serve pools from the API
This commit is contained in:
@@ -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)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user