Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions data/v2/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
PokemonShape,
PokemonShapeName,
PokemonSpecies,
PokemonSpeciesBallLegality,
PokemonSpeciesDescription,
PokemonSpeciesFlavorText,
PokemonSpeciesName,
Expand Down Expand Up @@ -1717,6 +1718,17 @@ def pal_parks_from_rows(info: list[str]) -> Iterator[PalPark]:
build_generic((PalPark,), "pal_park.csv", pal_parks_from_rows)


def _build_ball_legality() -> None:
def ball_legality_from_rows(info: list[str]) -> Iterator[PokemonSpeciesBallLegality]:
yield PokemonSpeciesBallLegality(pokemon_species_id=int(info[0]), item_id=int(info[1]))

build_generic(
(PokemonSpeciesBallLegality,),
"pokemon_species_ball_legality.csv",
ball_legality_from_rows,
)


def build_all() -> None:
_build_languages()
_build_regions()
Expand All @@ -1743,6 +1755,7 @@ def build_all() -> None:
_build_pokemons()
_build_encounters()
_build_pal_parks()
_build_ball_legality()


if __name__ == "__main__":
Expand Down
Loading
Loading