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.
Previously, PS would automatically redirect to a replay if linked
to a nonexistent battle room. This has been replaced with a
pop-up message linking to the replay.
Very old battles are still redirected to the replay.
/autojoin, /query, and /cmd are internal commands sent from client to
server, and do nothing but waste bandwidth if typed into chat.
Normally, this isn't worth protecting against, but some users are
confused about how autojoin works, so this guard saves some bandwidth.
This is a dumb hack to make sure that Staff and Upper Staff are to
the left of any autojoined rooms. They're excluded from autojoin, so
without this, they would be all the way on the right.
Basically, when opening PS, reopen the last chatrooms that were open
when PS was closed.
Limit 8 rooms. Staff and Upper Staff don't count towards the limit
because they're autojoined server-side. Lobby is not allowed to be
autojoined for server load reasons, and because it's autojoined
server-side on many other servers.
Currently only works for PS Main. An update that works for other
servers is coming soon.
This commit adds placeholder text reminding users that they can use
arrow keys to move between rooms when textboxes are focused and empty.
The placeholder text also includes the IDs of the rooms that can be
moved between.