diff --git a/src/@types/dex-data.ts b/src/@types/dex-data.ts new file mode 100644 index 00000000000..88cc16886bd --- /dev/null +++ b/src/@types/dex-data.ts @@ -0,0 +1,13 @@ +export interface DexData { + [key: number]: DexEntry; +} + +export interface DexEntry { + seenAttr: bigint; + caughtAttr: bigint; + natureAttr: number; + seenCount: number; + caughtCount: number; + hatchedCount: number; + ivs: number[]; +} diff --git a/src/data/abilities/ability-class.ts b/src/data/abilities/ability-class.ts index 9da83a32c4d..10bd01f3987 100644 --- a/src/data/abilities/ability-class.ts +++ b/src/data/abilities/ability-class.ts @@ -2,7 +2,7 @@ import { AbilityId } from "#enums/ability-id"; import type { AbAttrCondition } from "#app/@types/ability-types"; import type { AbAttr } from "#app/data/abilities/ab-attrs/ab-attr"; import i18next from "i18next"; -import type { Localizable } from "#app/interfaces/locales"; +import type { Localizable } from "#app/@types/locales"; import type { Constructor } from "#app/utils/common"; export class Ability implements Localizable { diff --git a/src/data/egg-hatch-data.ts b/src/data/egg-hatch-data.ts index 949ed1af063..e81ae69515c 100644 --- a/src/data/egg-hatch-data.ts +++ b/src/data/egg-hatch-data.ts @@ -1,6 +1,7 @@ import { globalScene } from "#app/global-scene"; import type { PlayerPokemon } from "#app/field/pokemon"; -import type { DexEntry, StarterDataEntry } from "#app/system/game-data"; +import type { StarterDataEntry } from "#app/system/game-data"; +import type { DexEntry } from "#app/@types/dex-data"; /** * Stores data associated with a specific egg and the hatched pokemon diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index e98b28e2a48..1bd6db97005 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -81,7 +81,7 @@ import { TerrainType } from "../terrain"; import { ModifierPoolType } from "#app/modifier/modifier-type"; import { Command } from "../../ui/command-ui-handler"; import i18next from "i18next"; -import type { Localizable } from "#app/interfaces/locales"; +import type { Localizable } from "#app/@types/locales"; import { getBerryEffectFunc } from "../berry"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index df7a8c118d5..e946b526960 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -1,4 +1,4 @@ -import type { Localizable } from "#app/interfaces/locales"; +import type { Localizable } from "#app/@types/locales"; import { AbilityId } from "#enums/ability-id"; import { PartyMemberStrength } from "#enums/party-member-strength"; import { SpeciesId } from "#enums/species-id"; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index ab907d2f768..d9b8d73d3c3 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -62,6 +62,7 @@ import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; import { ArenaTrapTag } from "#app/data/arena-tag"; import { pokemonFormChanges } from "#app/data/pokemon-forms"; import type { PokemonType } from "#enums/pokemon-type"; +import type { DexData, DexEntry } from "../@types/dex-data"; export const defaultStarterSpecies: SpeciesId[] = [ SpeciesId.BULBASAUR, @@ -131,6 +132,7 @@ export function decrypt(data: string, bypassLogin: boolean): string { )(data); } +// TODO: Move all these exported interfaces to @types export interface SystemSaveData { trainerId: number; secretId: number; @@ -191,20 +193,6 @@ export interface VoucherCounts { [type: string]: number; } -export interface DexData { - [key: number]: DexEntry; -} - -export interface DexEntry { - seenAttr: bigint; - caughtAttr: bigint; - natureAttr: number; - seenCount: number; - caughtCount: number; - hatchedCount: number; - ivs: number[]; -} - export type StarterMoveset = [MoveId] | [MoveId, MoveId] | [MoveId, MoveId, MoveId] | [MoveId, MoveId, MoveId, MoveId]; export interface StarterFormMoveData { diff --git a/src/ui/pokedex-page-ui-handler.ts b/src/ui/pokedex-page-ui-handler.ts index 00e166f075d..5875e3394a2 100644 --- a/src/ui/pokedex-page-ui-handler.ts +++ b/src/ui/pokedex-page-ui-handler.ts @@ -20,7 +20,8 @@ import { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, normalForm } from import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; import { starterPassiveAbilities } from "#app/data/balance/passives"; import { PokemonType } from "#enums/pokemon-type"; -import type { DexEntry, StarterAttributes } from "#app/system/game-data"; +import type { StarterAttributes } from "#app/system/game-data"; +import type { DexEntry } from "#app/@types/dex-data"; import { AbilityAttr, DexAttr } from "#app/system/game-data"; import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import MessageUiHandler from "#app/ui/message-ui-handler"; diff --git a/src/ui/pokedex-ui-handler.ts b/src/ui/pokedex-ui-handler.ts index 8b3633d7422..96451041306 100644 --- a/src/ui/pokedex-ui-handler.ts +++ b/src/ui/pokedex-ui-handler.ts @@ -11,7 +11,8 @@ import { allSpecies, getPokemonSpeciesForm, getPokerusStarters, normalForm } fro import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; import { catchableSpecies } from "#app/data/balance/biomes"; import { PokemonType } from "#enums/pokemon-type"; -import type { DexAttrProps, DexEntry, StarterAttributes, StarterPreferences } from "#app/system/game-data"; +import type { DexAttrProps, StarterAttributes, StarterPreferences } from "#app/system/game-data"; +import type { DexEntry } from "#app/@types/dex-data"; import { AbilityAttr, DexAttr, loadStarterPreferences } from "#app/system/game-data"; import MessageUiHandler from "#app/ui/message-ui-handler"; import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler"; diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index d8012a58875..3dbe3b7af7d 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -6,7 +6,8 @@ import { getNatureName } from "../data/nature"; import { PokemonType } from "#enums/pokemon-type"; import type Pokemon from "../field/pokemon"; import i18next from "i18next"; -import type { DexEntry, StarterDataEntry } from "../system/game-data"; +import type { StarterDataEntry } from "../system/game-data"; +import type { DexEntry } from "#app/@types/dex-data"; import { DexAttr } from "../system/game-data"; import { fixedInt, getShinyDescriptor } from "#app/utils/common"; import ConfirmUiHandler from "./confirm-ui-handler"; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 3bea0b08698..b7a7e0f3e6e 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -23,13 +23,8 @@ import { allSpecies, getPokemonSpeciesForm, getPokerusStarters } from "#app/data import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; import { PokemonType } from "#enums/pokemon-type"; import { GameModes } from "#app/game-mode"; -import type { - DexAttrProps, - DexEntry, - StarterMoveset, - StarterAttributes, - StarterPreferences, -} from "#app/system/game-data"; +import type { DexAttrProps, StarterMoveset, StarterAttributes, StarterPreferences } from "#app/system/game-data"; +import type { DexEntry } from "#app/@types/dex-data"; import { AbilityAttr, DexAttr, loadStarterPreferences, saveStarterPreferences } from "#app/system/game-data"; import { Tutorial, handleTutorial } from "#app/tutorial"; import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";