feat: add species and crown_type

https://github.com/fetus-hina/stat.ink/issues/1227
splashcat-exporter
imspace 2023-09-11 18:48:17 +08:00
parent 5e36f6c33d
commit 0cfe618f2f
2 changed files with 13 additions and 0 deletions

View File

@ -393,6 +393,8 @@ 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) {
@ -403,6 +405,13 @@ 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(
@ -699,6 +708,7 @@ 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

@ -145,6 +145,7 @@ export type VsPlayer = {
} | null;
paint: number;
crown: boolean;
festDragonCert: "NONE" | "DRAGON" | "DOUBLE_DRAGON";
headGear: PlayerGear;
clothingGear: PlayerGear;
@ -270,6 +271,8 @@ export type CoopHistoryPlayerResult = {
name: string;
id: string;
};
isMyself: boolean;
species: "INKLING" | "OCTOLING";
};
weapons: { name: string; image: Image | null }[];
specialWeapon: null | {