mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Cat in front of keyboar d sorry
This commit is contained in:
parent
ae89cb7fdc
commit
f649295cf0
@ -8,8 +8,8 @@ export class UpdateSessionSavedataRequest {
|
|||||||
/** This is **NOT** similar to {@linkcode ClearSessionSavedataRequest} */
|
/** This is **NOT** similar to {@linkcode ClearSessionSavedataRequest} */
|
||||||
export interface NewClearSessionSavedataRequest {
|
export interface NewClearSessionSavedataRequest {
|
||||||
slot: number;
|
slot: number;
|
||||||
clientSessionId: string;
|
|
||||||
result: boolean;
|
result: boolean;
|
||||||
|
clientSessionId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetSessionSavedataRequest {
|
export interface GetSessionSavedataRequest {
|
||||||
|
@ -176,17 +176,13 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
/* Added a local check to see if the game is running offline on victory
|
/* Added a local check to see if the game is running offline on victory
|
||||||
If Online, execute apiFetch as intended
|
If Online, execute apiFetch as intended
|
||||||
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 (!Utils.isLocal || Utils.isLocalServerConnected) {
|
||||||
if (!Utils.isLocal || Utils.isLocalServerConnected) {
|
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, result: this.victory, clientSessionId: clientSessionId })
|
||||||
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, clientSessionId, result: this.victory })
|
.then((success) => doGameOver(!!success));
|
||||||
.then((success) => doGameOver(!!success));
|
|
||||||
} else {
|
|
||||||
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
|
||||||
doGameOver(result);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
doGameOver(false);
|
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
||||||
|
doGameOver(result);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ describe("Pokerogue Session Savedata API", () => {
|
|||||||
describe("Newclear", () => {
|
describe("Newclear", () => {
|
||||||
const params: NewClearSessionSavedataRequest = {
|
const params: NewClearSessionSavedataRequest = {
|
||||||
clientSessionId: "test-session-id",
|
clientSessionId: "test-session-id",
|
||||||
slot: 3,
|
result: true,
|
||||||
result: true
|
slot: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
it("should return true on SUCCESS", async () => {
|
it("should return true on SUCCESS", async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user