Compare commits

..

No commits in common. "daad8f5a94fc781376125fdba4b94c211b8c2f8d" and "1f5e994a25cd78af0a74cfe351e535c4ed64029a" have entirely different histories.

5 changed files with 9 additions and 35 deletions

View File

@ -1,11 +1,3 @@
## 0.4.10
feat: support random primary ability
## 0.4.9
feat: add species and crown_type
## 0.4.8
chore: update `WEB_VIEW_VERSION` and queries

View File

@ -9,7 +9,7 @@
},
"package": {
"productName": "s3si-ts",
"version": "0.4.10"
"version": "0.4.8"
},
"tauri": {
"allowlist": {

View File

@ -2,10 +2,10 @@ import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
export const AGENT_NAME = "splashcat / s3si.ts";
export const AGENT_VERSION = "1.1.1";
export const S3SI_VERSION = "0.4.10";
export const S3SI_VERSION = "0.4.8";
export const COMBINED_VERSION = `${AGENT_VERSION}/${S3SI_VERSION}`;
export const NSOAPP_VERSION = "2.7.0";
export const WEB_VIEW_VERSION = "4.0.0-dae4328c";
export const WEB_VIEW_VERSION = "4.0.0-091d4283";
export enum Queries {
HomeQuery =
"51fc56bbf006caf37728914aa8bc0e2c86a80cf195b4d4027d6822a3623098a8",

View File

@ -366,7 +366,7 @@ export class StatInkExporter implements GameExporter {
{ primaryGearPower, additionalGearPowers }: PlayerGear,
): StatInkGear => {
const primary = mapAbility(primaryGearPower);
if (!primary && !this.isRandom(primaryGearPower.image)) {
if (!primary) {
throw new Error("Unknown ability: " + primaryGearPower.name);
}
return {
@ -394,8 +394,6 @@ export class StatInkExporter implements GameExporter {
inked: player.paint,
gears: await this.mapGears(player),
crown: player.crown ? "yes" : "no",
crown_type: undefined,
species: player.species === "INKLING" ? "inkling" : "octoling",
disconnected: player.result ? "no" : "yes",
};
if (player.result) {
@ -406,13 +404,6 @@ export class StatInkExporter implements GameExporter {
result.signal = player.result.noroshiTry ?? undefined;
result.special = player.result.special;
}
if (player.crown) {
result.crown_type = "x";
} else if (player.festDragonCert === "DRAGON") {
result.crown_type = "100x";
} else if (player.festDragonCert === "DOUBLE_DRAGON") {
result.crown_type = "333x";
}
return result;
};
async mapBattle(
@ -630,18 +621,16 @@ export class StatInkExporter implements GameExporter {
}
isRandom(image: Image | null): boolean {
// question mark
const RANDOM_FILENAME = [
"473fffb2442075078d8bb7125744905abdeae651b6a5b7453ae295582e45f7d1",
"dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
];
const RANDOM_FILENAME =
"473fffb2442075078d8bb7125744905abdeae651b6a5b7453ae295582e45f7d1";
// file exporter will replace url to { pathname: string } | string
const url = image?.url as ReturnType<typeof urlSimplify> | undefined | null;
if (typeof url === "string") {
return RANDOM_FILENAME.some((i) => url.includes(i));
return url.includes(RANDOM_FILENAME);
} else if (url === undefined || url === null) {
return false;
} else {
return RANDOM_FILENAME.some((i) => url.pathname.includes(i));
return url.pathname.includes(RANDOM_FILENAME);
}
}
async mapCoopWeapon(
@ -711,7 +700,6 @@ export class StatInkExporter implements GameExporter {
rescued: rescuedCount,
defeat_boss: defeatEnemyCount,
disconnected: disconnected ? "yes" : "no",
species: player.species === "INKLING" ? "inkling" : "octoling",
};
}
mapKing(id?: string) {

View File

@ -148,7 +148,6 @@ export type VsPlayer = {
} | null;
paint: number;
crown: boolean;
festDragonCert: "NONE" | "DRAGON" | "DOUBLE_DRAGON";
headGear: PlayerGear;
clothingGear: PlayerGear;
@ -280,8 +279,6 @@ export type CoopHistoryPlayerResult = {
name: string;
id: string;
};
isMyself: boolean;
species: "INKLING" | "OCTOLING";
};
weapons: { name: string; image: Image | null }[];
specialWeapon: null | {
@ -653,7 +650,7 @@ export type StatInkWeapon = {
}[];
export type StatInkGear = {
primary_ability: string | null;
primary_ability: string;
secondary_abilities: (string | null)[];
};
@ -679,9 +676,7 @@ export type StatInkPlayer = {
special?: number;
gears?: StatInkGears;
crown?: "yes" | "no";
crown_type?: "x" | "100x" | "333x";
disconnected: "yes" | "no";
species: "inkling" | "octoling";
};
export type StatInkStage = {
@ -731,7 +726,6 @@ export type StatInkCoopPlayer = {
rescued: number;
defeat_boss: number;
disconnected: "yes" | "no";
species: "inkling" | "octoling";
};
export type StatInkCoopBoss = {