mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-28 20:49:20 +00:00
Add modeChain to gameInfo for debug purposes
This commit is contained in:
parent
2d0cf54a7f
commit
0df40893b2
@ -2653,6 +2653,7 @@ export default class BattleScene extends SceneBase {
|
||||
party: this.party ? this.party.map(p => {
|
||||
return { name: p.name, level: p.level };
|
||||
}) : [],
|
||||
modeChain: this.ui?.getModeChain() ?? [],
|
||||
};
|
||||
(window as any).gameInfo = gameInfo;
|
||||
}
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user