mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-08 09:22:17 +02:00
Filtered out shiny folders from json path
This commit is contained in:
parent
8d58f05c73
commit
2a1a9c79b7
@ -187,6 +187,7 @@ import { hasExpSprite } from "./sprites/sprite-utils";
|
|||||||
import { timedEventManager } from "./global-event-manager";
|
import { timedEventManager } from "./global-event-manager";
|
||||||
import { starterColors } from "./global-vars/starter-colors";
|
import { starterColors } from "./global-vars/starter-colors";
|
||||||
import { startingWave } from "./starting-wave";
|
import { startingWave } from "./starting-wave";
|
||||||
|
import { json } from "stream/consumers";
|
||||||
|
|
||||||
const DEBUG_RNG = false;
|
const DEBUG_RNG = false;
|
||||||
|
|
||||||
@ -413,16 +414,17 @@ export default class BattleScene extends SceneBase {
|
|||||||
experimental = this.experimentalSprites;
|
experimental = this.experimentalSprites;
|
||||||
}
|
}
|
||||||
const variant = atlasPath.includes("variant/") || /_[0-3]$/.test(atlasPath);
|
const variant = atlasPath.includes("variant/") || /_[0-3]$/.test(atlasPath);
|
||||||
if (experimental) {
|
const shiny = atlasPath.includes("shiny/");
|
||||||
experimental = hasExpSprite(key);
|
|
||||||
}
|
|
||||||
if (variant) {
|
if (variant) {
|
||||||
atlasPath = atlasPath.replace("variant/", "");
|
atlasPath = atlasPath.replace("variant/", "");
|
||||||
}
|
}
|
||||||
|
if (shiny) {
|
||||||
|
atlasPath = atlasPath.replace("shiny/", "");
|
||||||
|
}
|
||||||
this.load.atlas(
|
this.load.atlas(
|
||||||
key,
|
key,
|
||||||
`images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${atlasPath}.png`,
|
`images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${shiny ? "shiny/": ""}${atlasPath}.png`,
|
||||||
`images/pokemon/${variant ? "variant/" : ""}${experimental ? "exp/" : ""}${atlasPath}.json`,
|
`images/pokemon/${experimental ? "exp/" : ""}${variant ? atlasPath.replace(/_[0-3]/, "") : atlasPath}.json`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user