Removing extra parameters.

This commit is contained in:
frutescens 2024-11-09 11:38:22 -08:00
parent a1f900516c
commit ae89cb7fdc
3 changed files with 2 additions and 7 deletions

View File

@ -1,5 +1,3 @@
import { GameModes } from "#app/game-mode";
export class UpdateSessionSavedataRequest { export class UpdateSessionSavedataRequest {
slot: number; slot: number;
trainerId: number; trainerId: number;
@ -12,7 +10,6 @@ export interface NewClearSessionSavedataRequest {
slot: number; slot: number;
clientSessionId: string; clientSessionId: string;
result: boolean; result: boolean;
gameMode: GameModes;
} }
export interface GetSessionSavedataRequest { export interface GetSessionSavedataRequest {

View File

@ -178,7 +178,7 @@ export class GameOverPhase extends BattlePhase {
If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */ If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */
if (this.victory) { if (this.victory) {
if (!Utils.isLocal || Utils.isLocalServerConnected) { if (!Utils.isLocal || Utils.isLocalServerConnected) {
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, clientSessionId, result: this.victory, gameMode: this.scene.gameMode.modeId }) pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, clientSessionId, result: this.victory })
.then((success) => doGameOver(!!success)); .then((success) => doGameOver(!!success));
} else { } else {
this.scene.gameData.offlineNewClear(this.scene).then(result => { this.scene.gameData.offlineNewClear(this.scene).then(result => {

View File

@ -6,7 +6,6 @@ import type {
NewClearSessionSavedataRequest, NewClearSessionSavedataRequest,
UpdateSessionSavedataRequest, UpdateSessionSavedataRequest,
} from "#app/@types/PokerogueSessionSavedataApi"; } from "#app/@types/PokerogueSessionSavedataApi";
import { GameModes } from "#app/game-mode";
import { PokerogueSessionSavedataApi } from "#app/plugins/api/pokerogue-session-savedata-api"; import { PokerogueSessionSavedataApi } from "#app/plugins/api/pokerogue-session-savedata-api";
import type { SessionSaveData } from "#app/system/game-data"; import type { SessionSaveData } from "#app/system/game-data";
import { getApiBaseUrl } from "#app/test/utils/testUtils"; import { getApiBaseUrl } from "#app/test/utils/testUtils";
@ -30,8 +29,7 @@ describe("Pokerogue Session Savedata API", () => {
const params: NewClearSessionSavedataRequest = { const params: NewClearSessionSavedataRequest = {
clientSessionId: "test-session-id", clientSessionId: "test-session-id",
slot: 3, slot: 3,
result: true, result: true
gameMode: GameModes.CLASSIC
}; };
it("should return true on SUCCESS", async () => { it("should return true on SUCCESS", async () => {