mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes starter pokemon not being downloaded
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -28,6 +28,13 @@ def download_file(url, saveLocation)
|
||||
end
|
||||
end
|
||||
|
||||
def download_pokemon_sprite_if_missing(body, head)
|
||||
return if $PokemonSystem.download_sprites != 0
|
||||
get_fusion_sprite_path(head,body)
|
||||
end
|
||||
|
||||
|
||||
|
||||
def download_sprite(base_path, head_id, body_id, saveLocation = "Graphics/temp")
|
||||
begin
|
||||
downloaded_file_name = _INTL("{1}/{2}.{3}.png", saveLocation, head_id, body_id)
|
||||
@@ -114,7 +121,6 @@ end
|
||||
|
||||
|
||||
def list_online_custom_sprites(updateList=false)
|
||||
updateOnlineCustomSpritesFile if updateList
|
||||
sprites_list= []
|
||||
File.foreach(Settings::CUSTOM_SPRITES_FILE_PATH) do |line|
|
||||
sprites_list << line
|
||||
|
||||
Reference in New Issue
Block a user