textures on auth
This commit is contained in:
parent
0e1ba49a3e
commit
366231df98
@ -331,7 +331,7 @@ class ConnectionManager {
|
||||
throw new Error("No Auth code provided");
|
||||
}
|
||||
}
|
||||
const { authToken, userUuid, email, username, locale } = await Axios.get(`${PUSHER_URL}/login-callback`, {
|
||||
const { authToken, userUuid, email, username, locale, textures } = await Axios.get(`${PUSHER_URL}/login-callback`, {
|
||||
params: { code, nonce, token, playUri: this.currentRoom?.key },
|
||||
}).then((res) => {
|
||||
return res.data;
|
||||
@ -345,6 +345,20 @@ class ConnectionManager {
|
||||
gameManager.setPlayerName(username);
|
||||
}
|
||||
|
||||
const layers: string[] = [];
|
||||
if (textures) {
|
||||
let i = 0;
|
||||
for (const layerItem of textures) {
|
||||
if (layerItem !== undefined) {
|
||||
layers.push(layerItem.id);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (layers.length > 0) {
|
||||
gameManager.setCharacterLayers(layers);
|
||||
}
|
||||
}
|
||||
|
||||
if (locale) {
|
||||
try {
|
||||
if (locales.indexOf(locale) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user