mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-14 23:10:31 -05:00
Handle @pokemon-showdown/sets -> @smogon/sets change
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user