Compare commits

...

4 Commits

Author SHA1 Message Date
Frederico Santos
0df40893b2 Add modeChain to gameInfo for debug purposes 2024-08-24 17:59:41 +01:00
Frederico Santos
2d0cf54a7f revert modechain debug info 2024-08-24 17:47:21 +01:00
Frederico Santos
38d4a594a0 revert fix 2024-08-24 17:44:36 +01:00
Frederico Santos
0f6170b3f7 GetModeChain in window.gameInfo for prod debugging 2024-08-24 17:42:20 +01:00
3 changed files with 13 additions and 10 deletions

View File

@ -2652,7 +2652,8 @@ export default class BattleScene extends SceneBase {
wave: this.currentBattle?.waveIndex || 0,
party: this.party ? this.party.map(p => {
return { name: p.name, level: p.level };
}) : []
}) : [],
modeChain: this.ui?.getModeChain() ?? [],
};
(window as any).gameInfo = gameInfo;
}

View File

@ -97,7 +97,6 @@ export default class MenuUiHandler extends MessageUiHandler {
render() {
const ui = this.getUi();
console.log(ui.getModeChain());
this.excludedMenus = () => [
{ condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [ MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] },
{ condition: bypassLogin, options: [ MenuOptions.LOG_OUT ] }

View File

@ -453,6 +453,7 @@ export default class UI extends Phaser.GameObjects.Container {
}
if (chainMode && this.mode && !clear) {
this.modeChain.push(this.mode);
(this.scene as BattleScene).updateGameInfo();
}
this.mode = mode;
const touchControls = document?.getElementById("touchControls");
@ -500,6 +501,7 @@ export default class UI extends Phaser.GameObjects.Container {
resetModeChain(): void {
this.modeChain = [];
(this.scene as BattleScene).updateGameInfo();
}
revertMode(): Promise<boolean> {
@ -513,6 +515,7 @@ export default class UI extends Phaser.GameObjects.Container {
const doRevertMode = () => {
this.getHandler().clear();
this.mode = this.modeChain.pop()!; // TODO: is this bang correct?
(this.scene as BattleScene).updateGameInfo();
const touchControls = document.getElementById("touchControls");
if (touchControls) {
touchControls.dataset.uiMode = Mode[this.mode];