Compare commits

...

9 Commits

Author SHA1 Message Date
podar
95c5173965
Merge b7635f42c5 into 6873a89296 2025-06-18 20:41:55 -07:00
Sirz Benjie
b7635f42c5
Merge branch 'beta' into local_development_and_offline 2025-05-21 15:47:14 -05:00
Amani H.
a174b52135
Merge branch 'beta' into local_development_and_offline 2025-05-21 14:59:17 -04:00
Sirz Benjie
e32e425655
Merge branch 'beta' into local_development_and_offline 2025-04-21 11:18:37 -05:00
podar
b49fd7e855
Update src/main.ts
Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
2024-10-30 18:16:39 -05:00
podar
10f87973af
Merge branch 'beta' into local_development_and_offline 2024-10-30 18:16:18 -05:00
Moka
cc1716355e
Merge branch 'beta' into local_development_and_offline 2024-10-29 16:56:52 +01:00
podar
0435aa6e5e
Merge branch 'beta' into local_development_and_offline 2024-10-28 20:54:02 -05:00
podar
9983ccfd18 Fixing local development and offline builds 2024-10-27 22:02:34 -05:00

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();
});