pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

[Misc] Miscellaneous code cleanup

Open DayKev opened this issue 4 months ago • 0 comments

What are the changes the user will see?

N/A

Why am I making these changes?

Just purifying some heretical code. 🙏

What are the changes from a developer perspective?

  • Replaced . with #app in overrides.ts imports.
  • Added a missing semicolon and missing explanation comment in eslint.config.js.
  • phases/move-effect-phase.ts:
    • Fix indentation
    • Renamed getTarget to getFirstTarget for clarity.
    • Converted namespace import (Utils) to named imports.
    • Added public/etc to class methods.
  • field/pokemon.ts:
    • Renamed generateVariant() to generateShinyVariant() for clarity.
    • Marked various methods as public/etc.
    • Added tsdocs to isOfType().
    • Updated various tsdocs and comments (and removed an obsolete comment).
    • Cleaned up the monstrosity that was a 450+ line of code (Xavion please...) into something readable.
  • utils.ts:
    • Removed an unused function randSeedEasedWeightedItem().
    • Marked IntegerHolder, FixedInt, and fixedInt() as deprecated.
    • Updated various tsdocs and comments.

How to test the changes?

Play the game normally.

Checklist

  • [x] I'm using beta as my base branch
  • [x] There is no overlap with another PR?
  • [x] The PR is self-contained and cannot be split into smaller PRs?
  • [x] Have I provided a clear explanation of the changes?
  • ~[ ] Have I considered writing automated tests for the issue?~
  • ~[ ] If I have text, did I make it translatable and add a key in the English locale file(s)?~
  • [x] Have I tested the changes (manually)?
    • [x] Are all unit tests still passing? (npm run test)
  • ~[ ] Are the changes visual?~
    • ~[ ] Have I provided screenshots/videos of the changes?~

DayKev avatar Oct 06 '24 12:10 DayKev