Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix showteam in replays #2164

Merged
merged 4 commits into from
Oct 20, 2023
Merged

Fix showteam in replays #2164

merged 4 commits into from
Oct 20, 2023

Conversation

Karthik99999
Copy link
Contributor

@Karthik99999 Karthik99999 commented Oct 18, 2023

  • Moves the HTML generation to BattleLog
  • Creates functions for unpackTeam and exportTeam under Battle as replays do not have access to the Storage functions.

@Karthik99999 Karthik99999 changed the title Create HTML for showteam protocol in BattleLog Fix showteam in replays Oct 18, 2023
@DaWoblefet DaWoblefet merged commit b47c593 into smogon:master Oct 20, 2023
1 check passed
mia-pi-git pushed a commit to mia-pi-git/pokemon-showdown-client that referenced this pull request Oct 24, 2023
@@ -3325,6 +3325,256 @@ export class Battle {
} as any;
}

// Taken from Storage, they need to be implemented here so `showteam` can work
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I think it's best not to duplicate this code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Centralizing in battle-dex.ts makes sense. It'd be loaded before Storage.

Zarel added a commit that referenced this pull request Nov 4, 2023
PR #2164 added duplicate copies of these functions to battle.ts
which is already quite overloaded. This temporarily relocates them
to battle-dex, in preparation for a longer-term deduplication
probably involving moving the storage.js implementation there.

The API has been revised slightly, to match the server's
sim/teams.ts.
MathyFurret pushed a commit to MathyFurret/pokemon-showdown-client that referenced this pull request Mar 25, 2024
MathyFurret pushed a commit to MathyFurret/pokemon-showdown-client that referenced this pull request Mar 25, 2024
PR smogon#2164 added duplicate copies of these functions to battle.ts
which is already quite overloaded. This temporarily relocates them
to battle-dex, in preparation for a longer-term deduplication
probably involving moving the storage.js implementation there.

The API has been revised slightly, to match the server's
sim/teams.ts.
@Karthik99999 Karthik99999 deleted the ots branch March 31, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants