pokemon-showdown/chat-plugins
Guangcong Luo e87fd32550 Refactor TeamValidator
The callback code in TeamValidator and the functions that use it have
been refactored to use Promises.

Pretty much all signatures have been changed, for instance:

    TeamValidator.validateTeamSync(format, team)
    -> TeamValidator(format).validateTeam(team)

    TeamValidator.validateTeam(format, team, callback)
    -> TeamValidator(format).prepTeam(team) // returns a Promise

Validators are no longer cached since they're really lightweight. They
contain a format and a Tools instance, and Tools instances are already
cached in Tools anyway. This saves a tiny bit of RAM in exchange for a
tiny bit of CPU time, but more importantly makes the code more
readable.

I'm introducing a new pattern/API for managing the parts of code with
child processes - their process managers are now at .PM and are now
opt-in, so you can use them synchronously without needing to spawn
any processes.

Fixes #2448
2016-03-16 09:43:59 -05:00
..
COMMANDS.md Refactor Context#getLastIdOf to User#getLastId 2016-02-28 03:25:35 -06:00
dexsearch.js Refactor TeamValidator 2016-03-16 09:43:59 -05:00
hangman.js Add permissions for roomgames 2016-02-26 22:19:19 +01:00
info.js Refactor TeamValidator 2016-03-16 09:43:59 -05:00
jeopardy.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
mafia-data.js Mafia: implement new roles 2016-01-29 02:44:31 +01:00
mafia.js Add permissions for roomgames 2016-02-26 22:19:19 +01:00
poll.js Add permissions for roomgames 2016-02-26 22:19:19 +01:00
scavengers.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00
tcgtabletop.js Remove /mtg and allow /ygo in all rooms 2016-03-16 02:10:23 +01:00
thehappyplace.js Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
thestudio.js The Studio plugin: update /aotd quote 2016-02-24 22:51:42 -06:00
trivia.js Remove usage of Array|Object methods implemented by Sugar.js 2016-03-09 16:55:34 -05:00
wifi.js Refactor for more ES6 features 2016-02-10 17:40:21 -06:00