Multiple bugfixes

This commit is contained in:
Pax1601
2023-07-31 08:08:20 +02:00
parent fd7f4b9772
commit c3b4c4ae36
22 changed files with 262 additions and 71 deletions

View File

@@ -184,8 +184,9 @@ export class MissionHandler {
#setcommandModeOptions(commandModeOptions: CommandModeOptions) {
/* Refresh all the data if we have exited the NONE state */
var requestRefresh = false;
if (this.#commandModeOptions.commandMode === NONE && commandModeOptions.commandMode !== NONE)
refreshAll();
requestRefresh = true;
/* Refresh the page if we have lost Game Master priviledges */
if (this.#commandModeOptions.commandMode === GAME_MASTER && commandModeOptions.commandMode !== GAME_MASTER)
@@ -214,6 +215,9 @@ export class MissionHandler {
document.querySelector("#spawn-points-container")?.classList.toggle("hide", this.getCommandModeOptions().commandMode === GAME_MASTER || !this.getCommandModeOptions().restrictSpawns);
document.querySelector("#command-mode-settings-button")?.classList.toggle("hide", this.getCommandModeOptions().commandMode !== GAME_MASTER);
if (requestRefresh)
refreshAll();
}
#onAirbaseClick(e: any) {