updates to version 6.1

This commit is contained in:
infinitefusion
2024-03-28 17:14:35 -04:00
parent e952a6f574
commit 1635409e6d
1151 changed files with 509422 additions and 5972 deletions

View File

@@ -49,6 +49,7 @@ def download_pokemon_sprite_if_missing(body, head)
get_fusion_sprite_path(head, body)
end
def download_sprite(base_path, head_id, body_id, saveLocation = "Graphics/temp", alt_letter = "", spriteformBody_suffix = "", spriteformHead_suffix = "")
begin
head_id = (head_id.to_s) + spriteformHead_suffix
@@ -75,7 +76,7 @@ def download_sprite(base_path, head_id, body_id, saveLocation = "Graphics/temp",
echoln _INTL("\nDownloaded file from {1} to {2}", base_path, saveLocation)
return downloaded_file_name
end
echoln "tried to download " + base_path
echoln "tried to download " + url
return nil
rescue MKXPError, Errno::ENOENT
return nil
@@ -110,6 +111,20 @@ def download_custom_sprite(head_id, body_id, spriteformBody_suffix = "", spritef
return nil
end
def download_custom_sprite_filename(filename)
head_id = (head_id.to_s) + spriteformHead_suffix.to_s
body_id = (body_id.to_s) + spriteformBody_suffix.to_s
return nil if $PokemonSystem.download_sprites != 0
url = Settings::CUSTOM_SPRITES_REPO_URL + "{1}.{2}{3}.png"
destPath = _INTL("{1}{2}", Settings::CUSTOM_BATTLERS_FOLDER_INDEXED, head_id)
if !Dir.exist?(destPath)
Dir.mkdir(destPath)
end
sprite = download_sprite(_INTL(url, head_id, body_id,alt_letter), head_id, body_id, destPath, alt_letter)
return sprite if sprite
return nil
end
#todo refactor & put custom base sprites in same folder as fusion sprites
def download_unfused_main_sprite(dex_num, alt_letter="")
base_url = alt_letter == "" ? Settings::BASE_POKEMON_SPRITES_REPO_URL : Settings::BASE_POKEMON_ALT_SPRITES_REPO_URL