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} */
|
||||
export interface NewClearSessionSavedataRequest {
|
||||
slot: number;
|
||||
clientSessionId: string;
|
||||
result: boolean;
|
||||
clientSessionId: string;
|
||||
}
|
||||
|
||||
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
|
||||
If Online, execute apiFetch as intended
|
||||
If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */
|
||||
if (this.victory) {
|
||||
if (!Utils.isLocal || Utils.isLocalServerConnected) {
|
||||
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, clientSessionId, result: this.victory })
|
||||
.then((success) => doGameOver(!!success));
|
||||
} else {
|
||||
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
||||
doGameOver(result);
|
||||
});
|
||||
}
|
||||
if (!Utils.isLocal || Utils.isLocalServerConnected) {
|
||||
pokerogueApi.savedata.session.newclear({ slot: this.scene.sessionSlotId, result: this.victory, clientSessionId: clientSessionId })
|
||||
.then((success) => doGameOver(!!success));
|
||||
} else {
|
||||
doGameOver(false);
|
||||
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
||||
doGameOver(result);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,8 @@ describe("Pokerogue Session Savedata API", () => {
|
||||
describe("Newclear", () => {
|
||||
const params: NewClearSessionSavedataRequest = {
|
||||
clientSessionId: "test-session-id",
|
||||
slot: 3,
|
||||
result: true
|
||||
result: true,
|
||||
slot: 3
|
||||
};
|
||||
|
||||
it("should return true on SUCCESS", async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user