mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-24 06:49:11 -05:00
Get tools/set-import to work again
- a scripts.js init() method now calls toID - Smogon updated the format of moveslots
This commit is contained in:
parent
26fa367f75
commit
37a331a4cb
2
build
2
build
|
|
@ -72,7 +72,7 @@ replace(path.join(__dirname, '.sim-dist'), [
|
|||
replace(path.join(__dirname, '.server-dist'), [
|
||||
{regex: new RegExp(`(require\\\(.*?)(lib|sim)(.*?\\\))`, 'g'), replace: `$1.$2-dist$3`},
|
||||
]);
|
||||
replace(path.join(__dirname, './tools/set-import'), [
|
||||
replace(path.join(__dirname, './tools/set-import/importer.js'), [
|
||||
{regex: new RegExp(`(require\\\(.*?)(lib|sim)(.*?\\\))`, 'g'), replace: `$1.$2-dist$3`},
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
"eslint": "^6.8.0",
|
||||
"husky": "^4.2.1",
|
||||
"mocha": "^7.0.1",
|
||||
"smogon": "^0.0.5",
|
||||
"smogon": "^0.1.0",
|
||||
"tslint": "^6.0.0",
|
||||
"typescript": "^3.7.5"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ function movesetToPokemonSet(dex: ModdedDex, format: Format, pokemon: string, se
|
|||
const level = getLevel(format, set.level);
|
||||
return {
|
||||
level: level === 100 ? undefined : level,
|
||||
moves: set.moveslots.map(ms => ms[0]),
|
||||
moves: set.moveslots.map(ms => ms[0]).map(s => s.type ? `${s.move} ${s.type}` : s.move),
|
||||
ability: fixedAbility(dex, pokemon, set.abilities[0]),
|
||||
item: set.items[0] === 'No Item' ? undefined : set.items[0],
|
||||
nature: set.natures[0],
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ Chat.plural = function (num, plural = 's', singular = '') {
|
|||
}
|
||||
return (num !== 1 ? plural : singular);
|
||||
};
|
||||
// Sigh. Yay globals!
|
||||
global.toID = require('../../.sim-dist/dex').Dex.getId;
|
||||
|
||||
const importer = require('./importer.js');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user