Compare commits

..

No commits in common. "0df40893b24920462c2a23b31a825a5615e3692d" and "7bea5eb86e79c7295ab2103466ae93e75a578702" have entirely different histories.

3 changed files with 10 additions and 13 deletions

View File

@ -2652,8 +2652,7 @@ 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,6 +97,7 @@ 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,7 +453,6 @@ 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");
@ -501,7 +500,6 @@ export default class UI extends Phaser.GameObjects.Container {
resetModeChain(): void {
this.modeChain = [];
(this.scene as BattleScene).updateGameInfo();
}
revertMode(): Promise<boolean> {
@ -515,7 +513,6 @@ 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];