NotForkBot.NET icon indicating copy to clipboard operation
NotForkBot.NET copied to clipboard

[TradeCord] `$list <species>` fix for with non-alphanumeric characters

Open LionOfJewdah opened this issue 10 months ago • 0 comments

Currently, a $list <species> command tries to parse the input as a member of the PKHeX.Core.Species enum directly. This works fine for most species names, but not when there is a dash ('-'), space ('-'), or apostrophe ('’'; i.e. Farfetch’d or Sirfetch’d). For those species, it fails to parse the enumeration and instead treats the input label as a nickname.

This is fine when the Pokémon in question is not nicknamed, but is more of a pain when the Pokémon is from a language such as French or German where the name does not match the English name. (Also, if a Pokémon such as Farfetch’d or Tapu Koko is nicknamed, even if its language is English, it will not be found by $list Farfetch'd or $list Tapu Koko.)

Generation 9 introduced many more Pokémon with dashes or spaces, in particular the Ruinous Legendaries and Paradox Pokémon. In particular, Paradox Pokémon are so far the only Pokémon with different species names in Spanish and Italian from the English names. This means $list Iron Hands will return only English-language, non-nicknamed Iron Hands (or any Pokémon someone has decided to nickname "Iron Hands", for some reason). It has been known for months that, for example, to find Spanish-language Iron Hands, one must enter $list Ferropalmas. Today, I confirmed by nicknaming one of my English Iron Hands "William", that $list Iron Hands does not find him after the nickname change (in the currently deployed code).

After this change, $list Ferropalmas should still list non-nicknamed Spanish-language Iron Hands, but $list Iron Hands should list all of someone's Iron Hands, whatever their language of origin and whatever their nickname.

LionOfJewdah avatar Apr 01 '24 21:04 LionOfJewdah