Handle @pokemon-showdown/sets -> @smogon/sets change

This commit is contained in:
Kirk Scheibelhut
2020-05-25 22:57:57 -07:00
parent 1364d76408
commit bb8d4f268c
2 changed files with 5 additions and 5 deletions

View File

@@ -5,12 +5,12 @@ const fs = require("fs");
const child_process = require('child_process');
const path = require("path");
process.stdout.write("Importing sets from @pokemon-showdown/sets... ");
process.stdout.write("Importing sets from @smogon/sets... ");
const shell = cmd => child_process.execSync(cmd, {stdio: 'inherit', cwd: path.resolve(__dirname, '..')});
shell(`npm install --no-audit --no-save @pokemon-showdown/sets`);
shell(`npm install --no-audit --no-save @smogon/sets`);
const src = path.resolve(__dirname, '../node_modules/@pokemon-showdown/sets');
const src = path.resolve(__dirname, '../node_modules/@smogon/sets');
const dest = path.resolve(__dirname, '../data/sets');
try {

View File

@@ -1557,7 +1557,7 @@
if (!formatSets) return;
var sets = $.extend({}, formatSets['smogon.com/dex'][species], formatSets['smogon.com/stats'][species]);
var sets = $.extend({}, formatSets['dex'][species], formatSets['stats'][species]);
$setDiv.text('Sample sets: ');
for (var set in sets) {
@@ -1570,7 +1570,7 @@
var species = this.curSet.species;
var setName = this.$(button).text();
var smogonSet = formatSets['smogon.com/dex'][species][setName] || formatSets['smogon.com/stats'][species][setName];
var smogonSet = formatSets['dex'][species][setName] || formatSets['stats'][species][setName];
var curSet = $.extend({}, this.curSet, smogonSet);
var text = Storage.exportTeam([curSet]);