From 662d023ff5ceb8516eb330cc26f4804f4f1be48b Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 10 Sep 2022 19:38:21 +0100 Subject: [PATCH] Improved console messages when compiling didn't happen, egg crack graphics are now found in the same way as egg graphics --- Data/Scripts/001_Technical/005_PluginManager.rb | 6 +++++- Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb | 5 +++++ .../016_UI/001_Non-interactive UI/003_UI_EggHatching.rb | 4 +--- Data/Scripts/021_Compiler/001_Compiler.rb | 9 ++++++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Data/Scripts/001_Technical/005_PluginManager.rb b/Data/Scripts/001_Technical/005_PluginManager.rb index 42a1f3ee8..549ed7375 100644 --- a/Data/Scripts/001_Technical/005_PluginManager.rb +++ b/Data/Scripts/001_Technical/005_PluginManager.rb @@ -627,7 +627,11 @@ module PluginManager # get the order of plugins to interpret order, plugins = self.getPluginOrder # compile if necessary - self.compilePlugins(order, plugins) if self.needCompiling?(order, plugins) + if self.needCompiling?(order, plugins) + self.compilePlugins(order, plugins) + else + Console.echoln_li "Plugins were not compiled." + end # load plugins scripts = load_data("Data/PluginScripts.rxdata") echoed_plugins = [] diff --git a/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb b/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb index bb6409d38..2a2e2fb92 100644 --- a/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb +++ b/Data/Scripts/010_Data/002_PBS data/009_Species_Files.rb @@ -57,6 +57,11 @@ module GameData return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000") end + def self.egg_cracks_sprite_filename(species, form) + ret = self.check_egg_graphic_file("Graphics/Pokemon/Eggs/", species, form, "_cracks") + return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000_cracks") + end + def self.sprite_filename(species, form = 0, gender = 0, shiny = false, shadow = false, back = false, egg = false) return self.egg_sprite_filename(species, form) if egg return self.back_sprite_filename(species, form, gender, shiny, shadow) if back diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb b/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb index 9426c7524..2b8e75af5 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb @@ -28,9 +28,7 @@ class PokemonEggHatch_Scene @pokemon.form, @pokemon.shiny?, false, false, true) # Egg sprite # Load egg cracks bitmap - crackfilename = sprintf("Graphics/Pokemon/Eggs/%s_cracks", @pokemon.species) - crackfilename = sprintf("Graphics/Pokemon/Eggs/000_cracks") if !pbResolveBitmap(crackfilename) - crackfilename = pbResolveBitmap(crackfilename) + crackfilename = GameData::Species.egg_cracks_sprite_filename(@pokemon.species, @pokemon.form) @hatchSheet = AnimatedBitmap.new(crackfilename) # Create egg cracks sprite @sprites["hatch"] = Sprite.new(@viewport) diff --git a/Data/Scripts/021_Compiler/001_Compiler.rb b/Data/Scripts/021_Compiler/001_Compiler.rb index 394a8b92a..40e7d5f08 100644 --- a/Data/Scripts/021_Compiler/001_Compiler.rb +++ b/Data/Scripts/021_Compiler/001_Compiler.rb @@ -778,9 +778,12 @@ module Compiler end def compile_all(mustCompile) - return if !mustCompile + if !mustCompile + Console.echo_h1(_INTL("Game did not compile data")) + return + end FileLineData.clear - Console.echo_h1 _INTL("Starting full compile") + Console.echo_h1 _INTL("Compiling all data") compile_pbs_files compile_animations compile_trainer_events(mustCompile) @@ -793,7 +796,7 @@ module Compiler System.reload_cache Console.echo_done(true) echoln "" - Console.echo_h2("Successfully fully compiled", text: :green) + Console.echo_h2("Successfully compiled all data", text: :green) end def main