better we.bslty & deveop integration
This commit is contained in:
@@ -8,9 +8,12 @@ import { localUserStore } from "../../Connexion/LocalUserStore";
|
||||
import { get } from "svelte/store";
|
||||
import { requestedCameraState, requestedMicrophoneState } from "../../Stores/MediaStore";
|
||||
import { helpCameraSettingsVisibleStore } from "../../Stores/HelpCameraSettingsStore";
|
||||
import Axios from "axios";
|
||||
import { menuIconVisiblilityStore } from "../../Stores/MenuStore";
|
||||
import { emoteMenuVisiblilityStore } from "../../Stores/EmoteStore";
|
||||
import { DEBUG_IGNORE_SSL } from "../../Enum/EnvironmentVariable";
|
||||
import Axios from "axios";
|
||||
import { AxiosRequestConfig } from "axios";
|
||||
import https from "https";
|
||||
|
||||
/**
|
||||
* This class should be responsible for any scene starting/stopping
|
||||
@@ -38,8 +41,18 @@ export class GameManager {
|
||||
this.loadMap(this.startRoom);
|
||||
|
||||
if (!this.playerName) {
|
||||
const res = await Axios.get("/");
|
||||
this.playerName = res.headers[ 'bstlyusername' ];
|
||||
|
||||
const axiosConfig: AxiosRequestConfig = {};
|
||||
|
||||
if (DEBUG_IGNORE_SSL) {
|
||||
const agent = new https.Agent({
|
||||
rejectUnauthorized: false,
|
||||
});
|
||||
axiosConfig.httpsAgent = agent;
|
||||
}
|
||||
|
||||
const response = await Axios.get("/", axiosConfig);
|
||||
this.playerName = response.headers[ 'bstlyusername' ];
|
||||
}
|
||||
|
||||
//If player name was not set show login scene with player name
|
||||
|
||||
@@ -1922,8 +1922,8 @@ export class GameScene extends DirtyScene {
|
||||
this.userInputManager.disableControls();
|
||||
this.scene.start(ErrorSceneName, {
|
||||
title: "Banned",
|
||||
subTitle: "You were banned from WorkAdventure",
|
||||
message: "If you want more information, you may contact us at: hello@workadventu.re",
|
||||
subTitle: "You were banned from Partey",
|
||||
message: "If you want more information, you may contact us at: partey@bstly.de",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1938,14 +1938,14 @@ export class GameScene extends DirtyScene {
|
||||
this.scene.start(ErrorSceneName, {
|
||||
title: "Connection rejected",
|
||||
subTitle: "The world you are trying to join is full. Try again later.",
|
||||
message: "If you want more information, you may contact us at: hello@workadventu.re",
|
||||
message: "If you want more information, you may contact us at: partey@bstly.de",
|
||||
});
|
||||
} else {
|
||||
this.scene.start(ErrorSceneName, {
|
||||
title: "Connection rejected",
|
||||
subTitle: "You cannot join the World. Try again later. \n\r \n\r Error: " + message + ".",
|
||||
subTitle: message + ".",
|
||||
message:
|
||||
"If you want more information, you may contact administrator or contact us at: hello@workadventu.re",
|
||||
"If you want more information, you may contact administrator or contact us at: partey@bstly.de",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export class EntryScene extends Scene {
|
||||
new WAError(
|
||||
"Access link incorrect",
|
||||
"Could not find map. Please check your access link.",
|
||||
"If you want more information, you may contact administrator or contact us at: hello@workadventu.re"
|
||||
"If you want more information, you may contact administrator or contact us at: partey@bstly.de"
|
||||
),
|
||||
this.scene
|
||||
);
|
||||
@@ -40,10 +40,9 @@ export class EntryScene extends Scene {
|
||||
ErrorScene.showError(
|
||||
new WAError(
|
||||
"Connection rejected",
|
||||
"You cannot join the World. Try again later" +
|
||||
(err.response.data ? ". \n\r \n\r" + `${err.response.data}` : "") +
|
||||
".",
|
||||
"If you want more information, you may contact administrator or contact us at: hello@workadventu.re"
|
||||
(err.response.data ? ". \n\r \n\r" + `${err.response.data}` : "") +
|
||||
".",
|
||||
"If you want more information, you may contact administrator or contact us at: partey@bstly.de"
|
||||
),
|
||||
this.scene
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user