From a8ae1a03422f4f4446f2cde77c6036e34dc55ff1 Mon Sep 17 00:00:00 2001 From: cawtds <38510667+cawtds@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:19:12 +0200 Subject: [PATCH] added missing minior description + test for missing descriptions (#4858) --- src/data/pokemon/species_info.h | 6 +----- src/data/pokemon/species_info/gen_7_families.h | 1 + src/data/pokemon/species_info/shared_dex_text.h | 7 +++++++ test/species.c | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/data/pokemon/species_info.h b/src/data/pokemon/species_info.h index 164edebbc9..c9bfa7a246 100644 --- a/src/data/pokemon/species_info.h +++ b/src/data/pokemon/species_info.h @@ -31,11 +31,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .categoryName = _("Unknown"), .height = 0, .weight = 0, - .description = COMPOUND_STRING( - "This is a newly discovered Pokémon.\n" - "It is currently under investigation.\n" - "No detailed information is available\n" - "at this time."), + .description = gFallbackPokedexText, .pokemonScale = 256, .pokemonOffset = 0, .trainerScale = 256, diff --git a/src/data/pokemon/species_info/gen_7_families.h b/src/data/pokemon/species_info/gen_7_families.h index fdb038b4c6..629ad59aa9 100644 --- a/src/data/pokemon/species_info/gen_7_families.h +++ b/src/data/pokemon/species_info/gen_7_families.h @@ -3617,6 +3617,7 @@ const struct SpeciesInfo gSpeciesInfoGen7[] = .baseSpAttack = 60, \ .baseSpDefense = 100, \ .weight = 400, \ + .description = gMiniorMeteorPokedexText, \ .frontPic = gMonFrontPic_MiniorMeteor, \ .frontPicSize = MON_COORDS_SIZE(48, 40), \ .frontPicYOffset = 14, \ diff --git a/src/data/pokemon/species_info/shared_dex_text.h b/src/data/pokemon/species_info/shared_dex_text.h index dbfef82d74..0c591bd811 100644 --- a/src/data/pokemon/species_info/shared_dex_text.h +++ b/src/data/pokemon/species_info/shared_dex_text.h @@ -1,3 +1,10 @@ +// fallback +const u8 gFallbackPokedexText[] = _( + "This is a newly discovered Pokémon.\n" + "It is currently under investigation.\n" + "No detailed information is available\n" + "at this time."); + // Gen 1 families const u8 gRaticateAlolanPokedexText[] = _( "It forms a group of Rattata, which it \n" diff --git a/test/species.c b/test/species.c index 3ad7495d23..7099855443 100644 --- a/test/species.c +++ b/test/species.c @@ -1,4 +1,5 @@ #include "global.h" +#include "string_util.h" #include "test/test.h" #include "constants/form_change_types.h" @@ -129,3 +130,18 @@ TEST("No species has two evolutions that use the evolution tracker") EXPECT(evolutionTrackerEvolutions < 2); } + +extern const u8 gFallbackPokedexText[]; + +TEST("Every species has a description") +{ + u32 i; + u32 species = SPECIES_NONE; + for (i = 1; i < NUM_SPECIES; i++) + { + if (IsSpeciesEnabled(i)) + PARAMETRIZE { species = i; } + } + + EXPECT_NE(StringCompare(GetSpeciesPokedexDescription(species), gFallbackPokedexText), 0); +}