textures on auth
This commit is contained in:
@@ -331,7 +331,7 @@ class ConnectionManager {
|
|||||||
throw new Error("No Auth code provided");
|
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 },
|
params: { code, nonce, token, playUri: this.currentRoom?.key },
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
return res.data;
|
return res.data;
|
||||||
@@ -345,6 +345,20 @@ class ConnectionManager {
|
|||||||
gameManager.setPlayerName(username);
|
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) {
|
if (locale) {
|
||||||
try {
|
try {
|
||||||
if (locales.indexOf(locale) == -1) {
|
if (locales.indexOf(locale) == -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user