Commit Graph

126 Commits

Author SHA1 Message Date
Kirk Scheibelhut
8b82693168 Add /help documentation for /tour sub 2019-07-15 11:46:34 -07:00
whales
82a666cc0e Fix tour format reporting (#5609) 2019-07-15 11:22:13 -05:00
Guangcong Luo
22ca01123d Refactor tournaments for better prop names
- `tour.originalFormat` -> `tour.baseFormat`
- `tour.teambuilderFormat` -> `tour.fullFormat`

These should better reflect what they actually mean.
2019-07-15 00:35:31 -05:00
whales
9147863403 Tournaments: Support replacing players (#5600) 2019-07-15 00:07:37 -05:00
whales
e918287cd6 Allow starting tournaments with a custom name (#5604) 2019-07-15 00:04:49 -05:00
TheJetOU
3c8b4f6872 Tournaments: Fix crash in /tournament cap (#5605)
`note` in this.modlog expects a string.
2019-07-14 17:46:39 -04:00
Kirk Scheibelhut
e85ebf2bcc Include player count in |tournament|start and /tour getusers (#5581) 2019-07-03 15:56:07 -07:00
Guangcong Luo
c5eeea2818 Fully fix double-elimination tournaments
(Also improve documentation of ElimNode)

PR #5509 was the correct direction, but it missed a spot.
2019-07-01 15:10:59 -07:00
Kirk Scheibelhut
df083d7528 Remove Object.assign(function) pattern from TeamValidator{Async} 2019-07-01 08:20:51 -07:00
whales
a87143f613 Fix crash in multi elim tours (#5516)
With the old api, node.getChildAt would return null if the node had no children
2019-06-02 00:17:57 -05:00
whales
448a25212e Fix multi-elimination tours (#5509) 2019-05-22 00:53:57 +01:00
HoeenHero
5202d7cc5b Tournaments: Only increase player count by 1 2019-05-16 11:12:42 -04:00
Quinton Lee
33663ac040
Tournaments: Fix disqualifying and signups list sorting 2019-05-15 19:30:44 -05:00
HoeenHero
3c1294bcca Properly handle users leaving tournaments 2019-05-15 11:13:31 -04:00
Kirk Scheibelhut
3d24166cdf toId -> toID
Closes #5479
2019-05-12 17:53:01 -07:00
Guangcong Luo
2093539e06
Update RoomGame API (#5492)
- The big change here is that player.userid can now be empty. You can
  now fit state into RoomGamePlayer subclasses even when there are no
  users associated with them.

- `game.players` has been introduced as the new canonical list of
  players, including userless players. The old `game.players` has been
  renamed `game.playerTable`, for clarity.

- `game.addPlayer` now returns the added player

All existing RoomGames have been updated for the new API, and
RoomBattle is now officially a RoomGame subclass.

Tournaments was also massively refactored to be properly updated for
the old API, since that never happened, and should now be a lot more
readable.
2019-05-12 12:56:32 +09:30
Kirk Scheibelhut
10c744f733 Introduce an ID type to sim (#5468) 2019-05-04 13:13:12 +12:00
Guangcong Luo
17ebb805a4 Fix typechecking in punishments.js
It turns out the line `let Punishments = module.exports;` makes it into
`any`, and disables nearly all typechecking of anything to do with
`Punishments`. This refactor fixes that, and also fixes a bunch of flaws
newly caught by TypeScript.

I tried my best not to make any changes to actual functionality. These
changes should be effectively purely code cleanup.
2019-04-22 08:39:05 +09:30
whales
770d3e6b50 Typescript tours (#5323) 2019-04-06 15:51:32 +08:00
MacChaeger
28affbc0ce Prevent a tournament exploit (#5353) 2019-03-31 18:19:47 +08:00
JetOU
1d70080d02 Fix crash in server/tournaments/index.js 2019-03-11 01:29:45 -05:00
Ben Davies
d8006887e4 Fix typo in server/tournaments/index.js 2019-03-10 23:04:42 -03:00
JetOU
85533ee3a0 Change forEach to for...of (#5269) 2019-03-08 11:24:58 -06:00
Jacob McLemore
34f90a9b55 Tours: Fix a forfeit being reported as failed even though it succeeded (#5188) 2019-02-20 02:11:43 -06:00
Guangcong Luo
b498bb222c Require object literal method shorthand 2019-02-11 18:14:09 -06:00
Guangcong Luo
f3e45fbb72 Move server code to server/
Also move mods/ to data/mods/

This makes PS more monorepo-like. The intent is to further separate
the sim and the server code, but without fully committing to splitting
the repository itself.

We now support `./pokemon-showdown start` in addition to
`./pokemon-showdown`. I'm not clear which I want to be the default
yet.
2019-02-03 16:07:06 -06:00