mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 17:09:26 +02:00
[Refactor] Minor cleanup of initExpKeys
(#6127)
This commit is contained in:
parent
7b7edbb474
commit
ab394db9cf
@ -699,16 +699,16 @@ export class BattleScene extends SceneBase {
|
|||||||
if (expSpriteKeys.size > 0) {
|
if (expSpriteKeys.size > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.cachedFetch("./exp-sprites.json")
|
const res = await this.cachedFetch("./exp-sprites.json");
|
||||||
.then(res => res.json())
|
const keys = await res.json();
|
||||||
.then(keys => {
|
if (!Array.isArray(keys)) {
|
||||||
if (Array.isArray(keys)) {
|
throw new Error("EXP Sprites were not array when fetched!");
|
||||||
for (const key of keys) {
|
}
|
||||||
expSpriteKeys.add(key);
|
|
||||||
}
|
// TODO: Optimize this
|
||||||
}
|
for (const k of keys) {
|
||||||
Promise.resolve();
|
expSpriteKeys.add(k);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user