Skip to content

Conversation

@Bertie690
Copy link
Contributor

@Bertie690 Bertie690 commented Nov 9, 2025

What are the changes the user will see?

N/A

Why am I making these changes?

  1. Default export bad
  2. I wanted to get strong typing on game.manifest

What are the changes from a developer perspective?

  • Removed unused default export
  • Made init code actually use top level await when loading fonts
  • Added typings for game.manifest to src/typings/phaser/index.d.ts and updated uses thereof to be correct
  • Made loader use globalScene's manifest instead of having it slapped on during loading scene preload via a setter

Screenshots/Videos

N/A

How to test the changes?

load game, make sure it runs

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? (pnpm test:silent)

@Bertie690 Bertie690 requested a review from a team as a code owner November 9, 2025 03:52
@Madmadness65 Madmadness65 added the Refactor Rewriting existing code related label Nov 9, 2025
Bertie690 and others added 5 commits November 8, 2025 23:21
Co-authored-by: NightKev <[email protected]>
Co-authored-by: NightKev <[email protected]>
Co-authored-by: NightKev <[email protected]>
Co-authored-by: NightKev <[email protected]>
Co-authored-by: NightKev <[email protected]>
@Bertie690 Bertie690 requested a review from DayKev November 9, 2025 04:22
DayKev
DayKev previously approved these changes Nov 9, 2025
Copy link
Collaborator

@DayKev DayKev left a comment

Choose a reason for hiding this comment

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

You can also update scene-base.ts:

index 26a680f2162..3f04a48e2f4 100644
--- a/src/scene-base.ts
+++ b/src/scene-base.ts
@@ -18,12 +18,10 @@ export class SceneBase extends Phaser.Scene {
   };
 
   getCachedUrl(url: string): string {
-    const manifest = this.game["manifest"];
-    if (manifest) {
-      const timestamp = manifest[`/${url}`];
-      if (timestamp) {
-        url += `?t=${timestamp}`;
-      }
+    const { manifest } = this.game;
+    const timestamp = manifest?.[`/${url}`];
+    if (timestamp) {
+      url += `?t=${timestamp}`;
     }
     return url;
   }

@Bertie690
Copy link
Contributor Author

Sure - make the commit if you want or ill do it tmr maybe

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.

3 participants