Fix scene-test and gallery-test (#1781)

Dex.getSpecies -> Dex.species.get
This commit is contained in:
Karthik 2021-05-12 18:33:31 -04:00 committed by GitHub
parent 333a5d04b6
commit 6db8a565e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@
let i = 0;
for (let baseid in BattlePokedex) {
if (baseid.endsWith('totem')) continue;
const species = Dex.getSpecies(baseid);
const species = Dex.species.get(baseid);
for (let formid of [''].concat(species.cosmeticFormes || [])) {
let spriteid = species.spriteid;
if (formid) spriteid += '-' + formid.slice(species.id.length);

View File

@ -120,7 +120,7 @@
const SPECIES = [];
for (let baseid in BattlePokedex) {
const species = Dex.getSpecies(baseid);
const species = Dex.species.get(baseid);
for (let formid of [''].concat(species.cosmeticFormes || [])) {
let spriteid = species.spriteid;
if (formid) spriteid += '-' + formid.slice(species.id.length);
@ -340,7 +340,7 @@
SETTINGS.active.inputs[1].disabled = gen < 3;
SETTINGS.active.inputs[2].disabled = gen > 6 || gen < 5;
for (const side in SIDES) {
const species = Dex.getSpecies(SIDES[side].pokemon.select.value);
const species = Dex.species.get(SIDES[side].pokemon.select.value);
if (gen === 1) {
SIDES[side].female.input.disabled = true;
} else if (species.gender) {
@ -599,7 +599,7 @@
function getGender(gen, pokemon, female) {
if (gen === 1) return undefined;
const species = Dex.getSpecies(pokemon);
const species = Dex.species.get(pokemon);
if (species.gender) return species.gender;
return female ? 'F' : 'M';
}