mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-23 08:42:19 +02:00
Apply suggestions from code review
This commit is contained in:
parent
951f29f729
commit
4c9e9a4adf
@ -2369,7 +2369,9 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the phaseQueue
|
||||
* Clears the phaseQueue, but does not clear any other phase-related stuff.
|
||||
*
|
||||
* TODO: Should this function be replaced by {@linkcode clearAllPhases}?
|
||||
*/
|
||||
clearPhaseQueue(): void {
|
||||
this.phaseQueue.splice(0, this.phaseQueue.length);
|
||||
@ -2377,8 +2379,6 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
/**
|
||||
* Clears all phase-related stuff, including all phase queues, the current and standby phases, and a splice index.
|
||||
*
|
||||
* Currently, this is a utility function only used by unit tests.
|
||||
*/
|
||||
clearAllPhases(): void {
|
||||
for (const queue of [ this.phaseQueue, this.phaseQueuePrepend, this.conditionalQueue, this.nextCommandPhaseQueue ]) {
|
||||
|
@ -57,7 +57,6 @@ import fs from "fs";
|
||||
import { expect, vi } from "vitest";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import type StarterSelectUiHandler from "#app/ui/starter-select-ui-handler";
|
||||
import { GameData } from "#app/system/game-data";
|
||||
|
||||
/**
|
||||
* Class to manage the game state and transitions between phases.
|
||||
@ -100,9 +99,8 @@ export default class GameManager {
|
||||
this.phaseInterceptor = new PhaseInterceptor(this.scene);
|
||||
|
||||
if (!firstTimeScene) {
|
||||
this.scene.reset();
|
||||
this.scene.reset(false, true);
|
||||
(this.scene.ui.handlers[Mode.STARTER_SELECT] as StarterSelectUiHandler).clearStarterPreferences();
|
||||
this.scene.gameData = new GameData();
|
||||
this.scene.clearAllPhases();
|
||||
|
||||
// This part, in particular, must not be run before the PhaseInterceptor has been initialized.
|
||||
|
Loading…
Reference in New Issue
Block a user