Skip to content

docs: clean up & document game speed-related code#7136

Open
Bertie690 wants to merge 3 commits intopagefaultgames:betafrom
Bertie690:game-speed-cleanup
Open

docs: clean up & document game speed-related code#7136
Bertie690 wants to merge 3 commits intopagefaultgames:betafrom
Bertie690:game-speed-cleanup

Conversation

@Bertie690
Copy link
Contributor

@Bertie690 Bertie690 commented Mar 4, 2026

What are the changes the user will see?

N/A

Why am I making these changes?

The game speed code was not well documented, and also specified many lengthy types that could (and should) be inferred.

I was particularly motivated by mutateProperties, which had a parameter type of any and a biome ignore that brushed a larger issue aside.

What are the changes from a developer perspective?

Added documentation to various functions and methods used by the game speed code, removing type specifications where TS was able to infer them.

Altered obj inside mutateProperties to be object for slightly more safety, and mentioned the fact that the method would be within allowed bounds were it not defined inside the initGameSpeed function.
(For those curious, I just added oneline if statements until it started giving errors, since each one is worth 1 point without nesting.)

Screenshots/Videos

N/A

How to test the changes?

N/A

Checklist

  • The PR content is correctly formatted:
    • I'm using beta as my base branch
    • The current branch is not named beta, main or the name of another long-lived feature branch
    • I have provided a clear explanation of the changes within the PR description
    • The PR title matches the Conventional Commits format (as described in CONTRIBUTING.md)
  • The PR is self-contained and cannot be split into smaller PRs
  • There is no overlap with another open PR
  • The PR has been confirmed to work correctly:
    • I have tested the changes manually
    • The full automated test suite still passes (use pnpm test:silent to test locally)

@Bertie690 Bertie690 requested a review from a team as a code owner March 4, 2026 06:52
@Bertie690 Bertie690 changed the title refactor: clean up & document game speed-related code docs: clean up & document game speed-related code Mar 4, 2026
@Bertie690 Bertie690 added the Documentation Improvements or additions to documentation label Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant