mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 23:13:42 +02:00
fixed the bug, ruined my sanity
This commit is contained in:
parent
54836ccd4a
commit
9f185cd8a8
@ -77,14 +77,18 @@ export class PromptHandler extends GameManagerHelper {
|
||||
* Helper method to wrap UI mode changing.
|
||||
* @param args - Arguments being passed to the original method
|
||||
* @returns The original return value.
|
||||
* @todo Make this wait for the actual UI mode setting
|
||||
*/
|
||||
private async setMode(args: Parameters<typeof this.originalSetModeInternal>) {
|
||||
private setMode(
|
||||
args: Parameters<typeof this.originalSetModeInternal>,
|
||||
): ReturnType<typeof this.originalSetModeInternal> {
|
||||
const mode = args[0];
|
||||
|
||||
this.doLog(
|
||||
`UI mode changed from ${getEnumStr(UiMode, this.game.scene.ui.getMode())} to ${getEnumStr(UiMode, mode)}!`,
|
||||
);
|
||||
const ret = await this.originalSetModeInternal.apply(this.game.scene.ui, args);
|
||||
// TODO: Add `await` to this
|
||||
const ret = this.originalSetModeInternal.apply(this.game.scene.ui, args);
|
||||
|
||||
const currentPhase = this.game.scene.phaseManager.getCurrentPhase()?.phaseName!;
|
||||
if (endBySetMode.includes(currentPhase)) {
|
||||
|
Loading…
Reference in New Issue
Block a user