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 ## 0.4.8
chore: update `WEB_VIEW_VERSION` and queries chore: update `WEB_VIEW_VERSION` and queries

View File

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

View File

@ -2,10 +2,10 @@ import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
export const AGENT_NAME = "splashcat / s3si.ts"; export const AGENT_NAME = "splashcat / s3si.ts";
export const AGENT_VERSION = "1.1.1"; 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 COMBINED_VERSION = `${AGENT_VERSION}/${S3SI_VERSION}`;
export const NSOAPP_VERSION = "2.7.0"; 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 { export enum Queries {
HomeQuery = HomeQuery =
"51fc56bbf006caf37728914aa8bc0e2c86a80cf195b4d4027d6822a3623098a8", "51fc56bbf006caf37728914aa8bc0e2c86a80cf195b4d4027d6822a3623098a8",

View File

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

View File

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