diff --git a/Data/Map106.rxdata b/Data/Map106.rxdata index a303eed83..ed07b5331 100644 Binary files a/Data/Map106.rxdata and b/Data/Map106.rxdata differ diff --git a/Data/Map647.rxdata b/Data/Map647.rxdata index 2517d7217..f1c79ec8c 100644 Binary files a/Data/Map647.rxdata and b/Data/Map647.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index e1a213c13..4a7aa6f36 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/052_AddOns/HttpCalls.rb b/Data/Scripts/052_AddOns/HttpCalls.rb index 350e12556..f785824b8 100644 --- a/Data/Scripts/052_AddOns/HttpCalls.rb +++ b/Data/Scripts/052_AddOns/HttpCalls.rb @@ -43,6 +43,7 @@ def download_file(url, saveLocation) return saveLocation else echoln _INTL("Failed to download file {1}", url) + echoln caller end return nil rescue MKXPError, Errno::ENOENT => error @@ -72,6 +73,7 @@ def fetch_sprite_from_web(url, destinationPath) return true end echoln "Failed to download #{url}" + echoln caller return false rescue MKXPError => e echoln "MKXPError: #{e.message}" @@ -85,8 +87,7 @@ def fetch_sprite_from_web(url, destinationPath) end def download_spritesheet(pif_sprite, dest) - #return nil if requestRateExceeded?(Settings::CUSTOMSPRITES_RATE_LOG_FILE,Settings::CUSTOMSPRITES_ENTRIES_RATE_TIME_WINDOW,Settings::CUSTOMSPRITES_RATE_MAX_NB_REQUESTS) - return nil if requestRateExceeded?(Settings::CUSTOMSPRITES_RATE_LOG_FILE, 60, 15) + return nil if requestRateExceeded?(Settings::CUSTOMSPRITES_RATE_LOG_FILE,Settings::CUSTOMSPRITES_ENTRIES_RATE_TIME_WINDOW,Settings::CUSTOMSPRITES_RATE_MAX_NB_REQUESTS) case pif_sprite.type when :AUTOGEN return @@ -420,8 +421,8 @@ def requestRateExceeded?(logFile, timeWindow, maxRequests, update_log_file = tru # Write the updated log back to the file if update_log_file File.write(logFile, request_timestamps.join("\n")) - echoln "Rate limiting: Current: #{request_timestamps.size}, Max: #{maxRequests}" end + echoln "Rate limiting: Current: #{request_timestamps.size}, Max: #{maxRequests}" rateLimitExceeded = request_timestamps.size > maxRequests return rateLimitExceeded end diff --git a/Data/Scripts/052_AddOns/MultiSaves.rb b/Data/Scripts/052_AddOns/MultiSaves.rb index 6c8c00518..1299ec08f 100644 --- a/Data/Scripts/052_AddOns/MultiSaves.rb +++ b/Data/Scripts/052_AddOns/MultiSaves.rb @@ -379,9 +379,22 @@ class PokemonLoadScreen def check_for_spritepack_update() $updated_spritesheets = [] if !$updated_spritesheets if new_spritepack_was_released() - reset_updated_spritesheets_cache() - $updated_spritesheets = [] - end + pbFadeOutIn() { + return if !downloadAllowed?() + should_update = pbConfirmMessage("A new spritepack was released. Would you like to let the game update your game's sprites automatically?") + if should_update + updateCreditsFile() + updateOnlineCustomSpritesFile() + reset_updated_spritesheets_cache() + spritesLoader = BattleSpriteLoader.new + spritesLoader.clear_sprites_cache(:CUSTOM) + spritesLoader.clear_sprites_cache(:BASE) + + $updated_spritesheets = [] + pbMessage("Data files updated. New sprites will now be downloaded as you play!") + end + } + end end def reset_updated_spritesheets_cache() @@ -426,9 +439,7 @@ class PokemonLoadScreen def pbStartLoadScreen updateHttpSettingsFile - updateCreditsFile updateCustomDexFile - updateOnlineCustomSpritesFile newer_version = find_newer_available_version if newer_version pbMessage(_INTL("Version {1} is now available! Please use the game's installer to download the newest version. Check the Discord for more information.", newer_version)) @@ -444,6 +455,7 @@ class PokemonLoadScreen pbMessage(_INTL("{1} new custom sprites were imported into the game", $game_temp.nb_imported_sprites.to_s)) end checkEnableSpritesDownload + $game_temp.nb_imported_sprites = nil copyKeybindings() save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS @@ -507,11 +519,11 @@ class PokemonLoadScreen @scene.pbEndScene Game.load(@save_data) $game_switches[SWITCH_V5_1] = true + check_for_spritepack_update() ensureCorrectDifficulty() setGameMode() initialize_alt_sprite_substitutions() $PokemonGlobal.autogen_sprites_cache = {} - check_for_spritepack_update() preload_party(@save_data[:player]) return when cmd_new_game diff --git a/Data/Scripts/DownloadedSettings.rb b/Data/Scripts/DownloadedSettings.rb index ff4ddc427..9a9487a12 100644 --- a/Data/Scripts/DownloadedSettings.rb +++ b/Data/Scripts/DownloadedSettings.rb @@ -32,8 +32,8 @@ module Settings BASE_POKEMON_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/customsprites/spritesheets/spritesheets_base/" CUSTOM_FUSIONS_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/customsprites/spritesheets/spritesheets_custom/" - CUSTOMSPRITES_RATE_MAX_NB_REQUESTS = 5 #Nb. requests allowed in each time window - CUSTOMSPRITES_ENTRIES_RATE_TIME_WINDOW = 120 # In seconds + CUSTOMSPRITES_RATE_MAX_NB_REQUESTS = 15 #Nb. requests allowed in each time window + CUSTOMSPRITES_ENTRIES_RATE_TIME_WINDOW = 60 # In seconds MAX_NB_SPRITES_TO_DOWNLOAD_AT_ONCE =5 #POKEDEX ENTRIES @@ -44,7 +44,7 @@ module Settings AI_ENTRIES_RATE_LOG_FILE = 'Data/pokedex/rate_limit.log' # Path to the log file #Spritepack - NEWEST_SPRITEPACK_MONTH = 2 + NEWEST_SPRITEPACK_MONTH = 4 NEWEST_SPRITEPACK_YEAR = 2025 diff --git a/Data/System.rxdata b/Data/System.rxdata index 2ae67d064..17ce3170c 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Graphics/Titles/loading_screen.png b/Graphics/Titles/loading_screen.png index 0aa425dd4..9bd165680 100644 Binary files a/Graphics/Titles/loading_screen.png and b/Graphics/Titles/loading_screen.png differ