fix: missing king_smell (#28)

main
spacemeowx2 2022-11-25 20:03:09 +08:00
parent ddc3eb88df
commit 47a3425627
4 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,8 @@
## 0.1.25
fix: missing king_smell
([#28](https://github.com/spacemeowx2/s3si.ts/issues/28))
## 0.1.24
fix: missing coop weapons

View File

@ -1,7 +1,7 @@
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
export const AGENT_NAME = "s3si.ts";
export const S3SI_VERSION = "0.1.24";
export const S3SI_VERSION = "0.1.25";
export const NSOAPP_VERSION = "2.3.1";
export const WEB_VIEW_VERSION = "1.0.0-433ec0e8";
export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts";

View File

@ -536,6 +536,7 @@ export class StatInkExporter implements GameExporter {
scale,
playedTime,
enemyResults,
smellMeter,
} = detail;
const startedAt = Math.floor(new Date(playedTime).getTime() / 1000);
@ -552,6 +553,9 @@ export class StatInkExporter implements GameExporter {
defeated_by_me: i.defeatCount,
}]),
);
const clear_waves =
detail.waveResults.filter((i) => i.waveNumber < 4).length -
1 + (resultWave === 0 ? 1 : 0);
const result: StatInkCoopPostBody = {
uuid: await gameId(detail.id),
@ -559,9 +563,9 @@ export class StatInkExporter implements GameExporter {
big_run: "no",
stage: b64Number(detail.coopStage.id).toString(),
danger_rate: dangerRate * 100,
clear_waves: detail.waveResults.filter((i) => i.waveNumber < 4).length -
1 + (resultWave === 0 ? 1 : 0),
clear_waves,
fail_reason: null,
king_smell: smellMeter,
king_salmonid: this.mapKing(detail.bossResult?.boss.id),
clear_extra: bossResult?.hasDefeatBoss ? "yes" : "no",
title_after: detail.afterGrade

View File

@ -474,6 +474,7 @@ export type StatInkCoopPostBody = {
// [0, 3]
clear_waves: number;
fail_reason?: null | "wipe_out" | "time_limit";
king_smell?: number | null;
king_salmonid?: string;
clear_extra: "yes" | "no";
title_before?: string;