feat: add fail_reason for salmon run
parent
54d53fc488
commit
ba43bb6c55
|
|
@ -1,3 +1,7 @@
|
|||
## 0.1.29
|
||||
|
||||
feat: add fail_reason for salmon run
|
||||
|
||||
## 0.1.28
|
||||
|
||||
fix: allow random weapon
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
|
||||
|
||||
export const AGENT_NAME = "s3si.ts";
|
||||
export const S3SI_VERSION = "0.1.28";
|
||||
export const S3SI_VERSION = "0.1.29";
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -604,6 +604,15 @@ export class StatInkExporter implements GameExporter {
|
|||
}
|
||||
}
|
||||
|
||||
let fail_reason: StatInkCoopPostBody["fail_reason"] = null;
|
||||
// failed
|
||||
if (clear_waves !== 3 && detail.waveResults.length > 0) {
|
||||
const lastWave = detail.waveResults[detail.waveResults.length - 1];
|
||||
if (lastWave.teamDeliverCount >= lastWave.deliverNorm) {
|
||||
fail_reason = "wipe_out";
|
||||
}
|
||||
}
|
||||
|
||||
const result: StatInkCoopPostBody = {
|
||||
uuid: await gameId(detail.id),
|
||||
private: groupInfo?.mode === "PRIVATE_CUSTOM" ? "yes" : "no",
|
||||
|
|
@ -611,7 +620,7 @@ export class StatInkExporter implements GameExporter {
|
|||
stage: b64Number(detail.coopStage.id).toString(),
|
||||
danger_rate: dangerRate * 100,
|
||||
clear_waves,
|
||||
fail_reason: null,
|
||||
fail_reason,
|
||||
king_smell: smellMeter,
|
||||
king_salmonid: this.mapKing(detail.bossResult?.boss.id),
|
||||
clear_extra: bossResult?.hasDefeatBoss ? "yes" : "no",
|
||||
|
|
|
|||
Loading…
Reference in New Issue