smogon / damage-calc

Pokemon games damage calculator
https://calc.pokemonshowdown.com
MIT License
369 stars 345 forks source link

Expose SETDEX in '@smogon/calc' npm package #622

Closed cameronangliss closed 1 month ago

cameronangliss commented 1 month ago

It would be useful for me to be able to access the SETDEXs for each generation so I could put the sets into the optional parameter when instantiating a Pokemon object. I saw that such a data structure exists in shared_controls.js. Would exposing that item in the @smogon/calc npm package be something people would be alright with?

thejetou commented 1 month ago

I'd prefer to not expose them in @smogon/calc because it's irrelevant to damage calculation and will just bloat up the bundle size. If you want the sets, you can write your own set importer (see import/set-import.ts) or fetch them from this repo (src/js/data/sets/*).

shrianshChari commented 1 month ago

I do believe that @pkmn/smogon provides APIs for looking at sets on the Smogon Dex, so that's probably also a good place to look.

cameronangliss commented 1 month ago

Ok, thanks!