This is a major refactor that changes the teambuilder to store
teams in packed format whenever possible, for approximately 50%
less memory usage for team storage.
The only visible change here is that pokemon nicknames have been
replaced with pokemon icons in the teambuilder team list, to
match the team selector in the main menu, which simplifies
extracting information from packed teams.
Specifically, |wide| makes a wide popup, suitable for modlog results.
And |modal| makes a modal popup, currently only used for locks and
bans, to make sure they're not accidentally dismissed.
A lot of people think the case of someone wanting to forfeit but
not leave the room is obscure, but for now, I think it's still
worth supporting. It's currently implemented as a checkbox, so
it's pretty unobtrusive.
See Zarel/Pokemon-Showdown@d5c622b493
New system is backwards-compatible with old one. This also slightly
refactors some other stuff, for an overall simpler system.
The Forfeit button in the menu that appears when you try to Close an
active battle is actually a 'Forfeit and close' button. It's now
just a Forfeit button, in case players want to stay in the room
for whatever reason. Actually leaving the room just involves clicking
the Close button again.
We have to pass an event through a few more functions to make the
Forfeit menu work like other semimodals in terms of opening near
the Close button when the Close button opens it.
Before, only nonmodal popups would appear next to the button that
opens them. Now, semimodal popups do as well. This should make certain
operations faster and more intuitive.
Watch Battle is now modal instead of semimodal, because it doesn't
work well in this kind of presentation.
Putting parentheses like this: (spoiler: test) now allows you to
designate a part of a line to be spoilered, instead of spoilering
everything to end-of-line. Yes, it's also possible to have
multiple spoilers on a line.
As a side effect, this also fixes the issue where spoilers messed
up modlogs by restricting them to one line.
With Simple Beam and Worry Seed now using -endability as well to reveal
the old ability, it is more appropriate to use a new message. Parentheses
are traditionally used by the client to indicate messages that do not
actually appear as in-game text.
The current implementation is buggy enough to be useless. Eventually
I'll make them continuous, but for now arrow-keys can only be used to
switch between chatrooms or between battle rooms.
This adds the 'Join other room' button on first load, allowing it to
be focused before the room list is retrieved. The button is also
focused whenever the room is focused (by clicking inside the room
or by switching to the room's tab), allowing people to switch out
of the room by pressing Left, or opening the join menu by pressing
Enter.