Fixes starter pokemon not being downloaded

This commit is contained in:
infinitefusion
2023-04-23 15:54:05 -04:00
parent 8534a51656
commit 087fe9a446
10 changed files with 34 additions and 18 deletions

View File

@@ -382,9 +382,10 @@ end
def obtainPokemonSpritePath(bodyId, headId, include_customs = true)
download_pokemon_sprite_if_missing(bodyId,headId)
picturePath = _INTL("Graphics/Battlers/{1}/{1}.{2}.png", headId, bodyId)
if include_customs
if include_customs && customSpriteExists(bodyId,headId)
pathCustom = getCustomSpritePath(bodyId,headId)
if (pbResolveBitmap(pathCustom))
picturePath = pathCustom
@@ -406,6 +407,16 @@ def customSpriteExists(species)
return download_custom_sprite(head, body) != nil
end
def customSpriteExists(body, head)
pathCustom = getCustomSpritePath(body,head)
return true if pbResolveBitmap(pathCustom) != nil
return download_custom_sprite(head, body) != nil
end
def customSpriteExistsBase(body,head)
pathCustom = getCustomSpritePath(body,head)
return true if pbResolveBitmap(pathCustom) != nil