This commit is contained in:
podar 2025-06-19 23:13:57 -07:00 committed by GitHub
commit e143dd85da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,8 +42,10 @@ Phaser.GameObjects.Rectangle.prototype.setPositionRelative = setPositionRelative
document.fonts.load("16px emerald").then(() => document.fonts.load("10px pkmnems"));
// biome-ignore lint/suspicious/noImplicitAnyLet: TODO
let game;
// biome-ignore lint/suspicious/noImplicitAnyLet: TODO
let manifest;
const startGame = async (manifest?: any) => {
const startGame = async () => {
await initI18n();
const LoadingScene = (await import("./loading-scene")).LoadingScene;
const BattleScene = (await import("./battle-scene")).default;
@ -107,10 +109,13 @@ const startGame = async (manifest?: any) => {
fetch("/manifest.json")
.then(res => res.json())
.then(jsonResponse => {
startGame(jsonResponse.manifest);
manifest = jsonResponse.manifest;
})
.catch(() => {
// Manifest not found (likely local build)
.catch(err => {
// Manifest not found (likely local build or path error on live)
console.log(`Manifest not found. ${err}`);
})
.finally(() => {
startGame();
});