Add workaround for crash with static variant sprites
parent
03ba74844f
commit
014c13b95b
|
@ -13,7 +13,7 @@ import { Biome } from "./data/enums/biome";
|
||||||
import { Arena, ArenaBase } from './field/arena';
|
import { Arena, ArenaBase } from './field/arena';
|
||||||
import { GameData, PlayerGender } from './system/game-data';
|
import { GameData, PlayerGender } from './system/game-data';
|
||||||
import StarterSelectUiHandler from './ui/starter-select-ui-handler';
|
import StarterSelectUiHandler from './ui/starter-select-ui-handler';
|
||||||
import { TextStyle, addBBCodeTextObject, addTextObject } from './ui/text';
|
import { TextStyle, addTextObject } from './ui/text';
|
||||||
import { Moves } from "./data/enums/moves";
|
import { Moves } from "./data/enums/moves";
|
||||||
import { allMoves } from "./data/move";
|
import { allMoves } from "./data/move";
|
||||||
import { initMoves } from './data/move';
|
import { initMoves } from './data/move';
|
||||||
|
@ -249,7 +249,7 @@ export default class BattleScene extends SceneBase {
|
||||||
loadPokemonAtlas(key: string, atlasPath: string, experimental?: boolean) {
|
loadPokemonAtlas(key: string, atlasPath: string, experimental?: boolean) {
|
||||||
if (experimental === undefined)
|
if (experimental === undefined)
|
||||||
experimental = this.experimentalSprites;
|
experimental = this.experimentalSprites;
|
||||||
let variant = atlasPath.includes('variant/');
|
let variant = atlasPath.includes('variant/') || /_[0-3]$/.test(atlasPath);
|
||||||
if (experimental)
|
if (experimental)
|
||||||
experimental = this.hasExpSprite(key);
|
experimental = this.hasExpSprite(key);
|
||||||
if (variant)
|
if (variant)
|
||||||
|
|
Loading…
Reference in New Issue