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

[Refactor] Moveset arrays can no longer hold null values #4919

Open
wants to merge 5 commits into
base: beta
Choose a base branch
from

Conversation

DayKev
Copy link
Collaborator

@DayKev DayKev commented Nov 19, 2024

What are the changes the user will see?

N/A

Why am I making these changes?

Movesets being "allowed" to hold null values causes the need for lots of unnecessary extra null checks, even though if a value were actually null it would break things regardless of said checks.

What are the changes from a developer perspective?

The type annotations for Pokemon.moveset, PokemonSummonData.moveset, PokemonData.moveset and the return of Pokemon.getMoveset() were updated to remove null.

How to test the changes?

npm run test
or just play the game.

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes manually?
  • Are all unit tests still passing? (npm run test)
    • [ ] Have I created new automated tests (npm run create-test) or updated existing tests related to the PR's changes?
  • [ ] Have I provided screenshots/videos of the changes (if applicable)?
    • [ ] Have I made sure that any UI change works for both UI themes (default and legacy)?

@DayKev DayKev added the Refactor Rewriting existing code related label Nov 19, 2024
@DayKev DayKev requested a review from a team as a code owner November 19, 2024 12:30
@DayKev DayKev force-pushed the remove-null-from-moveset branch from dcc9922 to 648506e Compare November 19, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Rewriting existing code related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant