Commit Graph

2152 Commits

Author SHA1 Message Date
Guangcong Luo
37af6ced67 Remove extraneous saveTeams function 2015-06-30 02:24:17 -05:00
Guangcong Luo
bbc2188a40 Refactor teambuilder to use packed teams
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.
2015-06-30 02:16:55 -05:00
Guangcong Luo
df1ec9ff3c Make sure popups are on-screen 2015-06-30 02:06:24 -05:00
Guangcong Luo
d41b7329b3 Show popup error for corrupt teams 2015-06-30 02:06:24 -05:00
Guangcong Luo
cc7af41bd5 Refactor Storage not to use _Storage class 2015-06-30 02:06:24 -05:00
Guangcong Luo
2a6a2667a7 Move team import/export functions to storage.js
This refactor moves:

TeambuilderRoom.parseText -> Storage.importTeam
TeambuileerRoom.toText -> Storage.exportTeam
TeambuilderRoom.teamsToText -> Storage.exportAllTeams
2015-06-29 17:17:51 -05:00
Guangcong Luo
4d21b8fc61 Support |popup||html|
This displays a popup containing (sanitized) HTML.
2015-06-29 17:21:32 -04:00
Guangcong Luo
2019b60cf1 Support |c|~|text
This displays "text" as a line in chat that can highlight, but otherwise
looks like a `||text` line.
2015-06-29 17:21:32 -04:00
Guangcong Luo
c1330dc050 Support <<roomid>> links in chat 2015-06-29 17:21:32 -04:00
Guangcong Luo
2723b1df3d Fix testclient.html support
(It was broken by the protocol change)
2015-06-29 02:26:16 -05:00
Guangcong Luo
1eea2b3f45 Prevent 'Find a user' from finding Zarel
It has been deemed to cause too much spam for Zarel :(
2015-06-28 00:50:17 -04:00
Guangcong Luo
434be97f8a Support |popup| options
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.
2015-06-28 00:50:17 -04:00
Guangcong Luo
50c8273d03 Support /error in PMs
It's like /text, except the text is red.
2015-06-28 00:50:17 -04:00
Guangcong Luo
2a6993f31e Forfeit menu also closes window by default
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.
2015-06-28 00:50:17 -04:00
Guangcong Luo
7c802fc4e0 Rainbow main menu!
In honor of Obergefell v. Hodges
2015-06-28 00:50:17 -04:00
Guangcong Luo
3f8ffa684f Support new challstr protocol
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.
2015-06-28 00:50:17 -04:00
Guangcong Luo
a6e56e969a Update jQuery to 2.1.4 2015-06-28 00:50:16 -04:00
Guangcong Luo
ea348e8a19 Remove outdated -webkit and -moz CSS
linear-gradient has been supported in most major browsers for long
enough that we can drop gradient support for really old browsers.
2015-06-28 00:50:16 -04:00
Ivo Julca
db16dd8abe Use toName to sanitize command targets 2015-06-27 02:40:08 -05:00
Ivo Julca
4a49f37f08 Don't warn on window close at localhost 2015-06-27 02:39:47 -05:00
Guangcong Luo
d2b5a0bad3 Support some CSS in sanitized HTML 2015-06-27 02:46:00 -04:00
Guangcong Luo
0486cc1026 Minor refactor to /user 2015-06-27 02:42:11 -04:00
Guangcong Luo
ec43507738 New 'Find a user' button in Main Menu
Should make it easier for players arranging battles outside of PS
to challenge each other.
2015-06-25 20:14:00 -04:00
Guangcong Luo
da98991b11 Fix crash in Forfeit menu 2015-06-25 20:13:42 -04:00
Guangcong Luo
37ca8f342a /part now gives a warning during active battles 2015-06-25 19:48:16 -04:00
Guangcong Luo
53bd58e18a Add 'Replace player' button in Forfeit menu
This is relevant to unrated battles, where you can swap out players.
2015-06-25 19:46:36 -04:00
Guangcong Luo
b1286fa7d9 Don't close when forfeiting from Close button
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.
2015-06-25 19:20:51 -04:00
Guangcong Luo
d51f9afdeb Open Forfeit menu next to Close button
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.
2015-06-25 19:14:04 -04:00
Guangcong Luo
2ce4754043 Remove Google Analytics ugly URLs
Google Analytics adds weird things to the URL when linking cross-
domain. This removes them after loading for less ugliness.
2015-06-25 19:09:59 -04:00
Guangcong Luo
6fab7de011 Warn before closing window with active battles 2015-06-25 19:08:39 -04:00
Guangcong Luo
fa6f20d352 Watch Battle window: Move Close button to top right 2015-06-25 19:07:46 -04:00
Guangcong Luo
9a9c7010de Open semimodal popups next to opener
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.
2015-06-25 19:05:09 -04:00
Guangcong Luo
60957d95c5 Fix bug in leaveBattle
It would show the other side as left, instead of your side.
2015-06-25 18:44:20 -04:00
Guangcong Luo
96dfe64a58 Close button forfeit menu opens for unrated battles too
Previously, the close button forfeit menu only appeared for rated
battles.
2015-06-25 18:43:04 -04:00
Guangcong Luo
d923f047cd Improve spoiler tag support
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.
2015-06-25 18:02:45 -04:00
Guangcong Luo
c4129beef0 Merge pull request #406 from ascriptmaster/move-messages
Change -endability message structure
2015-06-25 21:41:38 +00:00
Kevin Lau
97eaa72cbf Change -endability message structure
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.
2015-06-25 12:30:02 -07:00
Marty-D
3987b06098 Correct Mental Herb message 2015-06-25 12:30:43 -04:00
Guangcong Luo
5007cf3a38 Merge pull request #405 from SolarisFox/patch-5
Teambuilder: NaN IVs default to 31
2015-06-21 21:59:03 +00:00
SolarisFox
1a63765186 Teambuilder: NaN IVs default to 31 2015-06-21 13:39:43 -07:00
Guangcong Luo
92ff7d6da4 Merge pull request #404 from Bryan-0/patch-1
Escape é in "Pokémon"
2015-06-21 07:55:08 +00:00
Bryan AA
7c600fdf7c Escape é in "Pokémon"
- Add "&eacute;" Instead of "é".
2015-06-20 14:03:25 -06:00
The Immortal
f4c8a4f63f Teambuilder: Set level 5 for Gen 5 LC 2015-06-20 05:20:23 +04:00
Guangcong Luo
3e521b91a8 Merge pull request #365 from xfix/url-parsing-escape
Improve parsing of HTML entities for URLs.
2015-06-18 14:26:32 +00:00
Guangcong Luo
ac7be9ad37 Merge pull request #403 from QuiteQuiet/rage
Add the Rage status
2015-06-18 14:26:01 +00:00
Quite Quiet
bc7063f90b Add the Rage status 2015-06-18 15:58:34 +02:00
Guangcong Luo
3b8b925a2b Disallow arrow-key switching battle/chat rooms
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.
2015-06-15 18:33:41 -04:00
Guangcong Luo
41990df431 Roomlist refactor
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.
2015-06-15 18:16:13 -04:00
Guangcong Luo
5803513cb6 Default 'PMs in chat rooms' to false
This feature is a holdover from the old days before we had PM boxes.
I'm pretty sure most people don't like it.
2015-06-15 18:07:25 -04:00
Guangcong Luo
9b57f521a5 Teambuilder: Fix import/export textbox size 2015-06-12 20:34:42 -04:00