Improved console messages when compiling didn't happen, egg crack graphics are now found in the same way as egg graphics

This commit is contained in:
Maruno17
2022-09-10 19:38:21 +01:00
parent dcba641a86
commit 662d023ff5
4 changed files with 17 additions and 7 deletions

View File

@@ -627,7 +627,11 @@ module PluginManager
# get the order of plugins to interpret # get the order of plugins to interpret
order, plugins = self.getPluginOrder order, plugins = self.getPluginOrder
# compile if necessary # 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 # load plugins
scripts = load_data("Data/PluginScripts.rxdata") scripts = load_data("Data/PluginScripts.rxdata")
echoed_plugins = [] echoed_plugins = []

View File

@@ -57,6 +57,11 @@ module GameData
return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000") return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000")
end 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) 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.egg_sprite_filename(species, form) if egg
return self.back_sprite_filename(species, form, gender, shiny, shadow) if back return self.back_sprite_filename(species, form, gender, shiny, shadow) if back

View File

@@ -28,9 +28,7 @@ class PokemonEggHatch_Scene
@pokemon.form, @pokemon.shiny?, @pokemon.form, @pokemon.shiny?,
false, false, true) # Egg sprite false, false, true) # Egg sprite
# Load egg cracks bitmap # Load egg cracks bitmap
crackfilename = sprintf("Graphics/Pokemon/Eggs/%s_cracks", @pokemon.species) crackfilename = GameData::Species.egg_cracks_sprite_filename(@pokemon.species, @pokemon.form)
crackfilename = sprintf("Graphics/Pokemon/Eggs/000_cracks") if !pbResolveBitmap(crackfilename)
crackfilename = pbResolveBitmap(crackfilename)
@hatchSheet = AnimatedBitmap.new(crackfilename) @hatchSheet = AnimatedBitmap.new(crackfilename)
# Create egg cracks sprite # Create egg cracks sprite
@sprites["hatch"] = Sprite.new(@viewport) @sprites["hatch"] = Sprite.new(@viewport)

View File

@@ -778,9 +778,12 @@ module Compiler
end end
def compile_all(mustCompile) def compile_all(mustCompile)
return if !mustCompile if !mustCompile
Console.echo_h1(_INTL("Game did not compile data"))
return
end
FileLineData.clear FileLineData.clear
Console.echo_h1 _INTL("Starting full compile") Console.echo_h1 _INTL("Compiling all data")
compile_pbs_files compile_pbs_files
compile_animations compile_animations
compile_trainer_events(mustCompile) compile_trainer_events(mustCompile)
@@ -793,7 +796,7 @@ module Compiler
System.reload_cache System.reload_cache
Console.echo_done(true) Console.echo_done(true)
echoln "" echoln ""
Console.echo_h2("Successfully fully compiled", text: :green) Console.echo_h2("Successfully compiled all data", text: :green)
end end
def main def main