incomplete

This commit is contained in:
Amatsune 2024-06-23 22:27:05 +02:00
parent 8588ad17b9
commit 47620d76bd

View File

@ -14,7 +14,7 @@ import { GameMode } from "../game-mode";
import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities"; import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities";
import { VariantSet } from "./variant"; import { VariantSet } from "./variant";
import i18next from "i18next"; import i18next from "i18next";
import { FusionTranslationEntry, Localizable } from "#app/interfaces/locales"; import { Localizable } from "#app/interfaces/locales";
import { Stat } from "./pokemon-stat"; import { Stat } from "./pokemon-stat";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { PartyMemberStrength } from "#enums/party-member-strength"; import { PartyMemberStrength } from "#enums/party-member-strength";
@ -51,15 +51,8 @@ export function getPokemonSpeciesForm(species: Species, formIndex: integer): Pok
} }
export function getFusedSpeciesName(speciesAName: string, speciesBName: string): string { export function getFusedSpeciesName(speciesAName: string, speciesBName: string): string {
const speciesA = i18next.t(`fusionAffixes:${speciesAName}`) as FusionTranslationEntry; //I WAS HERE, DON'T KNOW HOW TO MAKE THIS WORK
const speciesB = i18next.t(`fusionAffixes:${speciesBName}`) as FusionTranslationEntry; return `${speciesAPrefix}${speciesBSuffix}`;
if (!speciesA || !speciesB) {
throw new Error(`One or both species not found: ${speciesAName}, ${speciesBName}`);
}
// Combine the fusionPrefix of speciesA with the fusionSuffix of speciesB using template literals
return `${speciesA.fusionPrefix}${speciesB.fusionSuffix}`;
} }
export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean; export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean;