Updated console message code to Luka's latest version

This commit is contained in:
Maruno17
2021-11-21 17:36:25 +00:00
parent b445f26a88
commit ea9cacd6b9
9 changed files with 173 additions and 151 deletions

View File

@@ -701,23 +701,23 @@ module Compiler
#=============================================================================
def compile_pbs_file_message_start(filename)
# The `` around the file's name turns it cyan
ConsoleRGB.echo_li _INTL("Compiling PBS file `{1}`...", filename.split("/").last)
Console.echo_li _INTL("Compiling PBS file `{1}`...", filename.split("/").last)
end
def write_pbs_file_message_start(filename)
# The `` around the file's name turns it cyan
ConsoleRGB.echo_li _INTL("Writing PBS file `{1}`...", filename.split("/").last)
Console.echo_li _INTL("Writing PBS file `{1}`...", filename.split("/").last)
end
def process_pbs_file_message_end
ConsoleRGB.echo_complete(true)
Console.echo_done(true)
Graphics.update
end
def compile_all(mustCompile)
return if !mustCompile
FileLineData.clear
ConsoleRGB.echo_h1 _INTL("Starting full compile")
Console.echo_h1 _INTL("Starting full compile")
compile_town_map # No dependencies
compile_connections # No dependencies
compile_phone # No dependencies
@@ -740,16 +740,16 @@ module Compiler
compile_map_metadata # No dependencies
compile_animations
compile_trainer_events(mustCompile)
ConsoleRGB.echo_li _INTL("Saving messages...")
Console.echo_li _INTL("Saving messages...")
pbSetTextMessages
MessageTypes.saveMessages
MessageTypes.loadMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat")
ConsoleRGB.echo_complete(true)
ConsoleRGB.echo_li _INTL("Reloading cache...")
Console.echo_done(true)
Console.echo_li _INTL("Reloading cache...")
System.reload_cache
ConsoleRGB.echo_complete(true)
Console.echo_done(true)
echoln ""
ConsoleRGB.echo_h2("Successfully fully compiled", text: :green)
Console.echo_h2("Successfully fully compiled", text: :green)
end
def main

View File

@@ -1727,7 +1727,7 @@ module Compiler
# Compile battle animations
#=============================================================================
def compile_animations
ConsoleRGB.echo_li _INTL("Compiling animations...")
Console.echo_li _INTL("Compiling animations...")
begin
pbanims = load_data("Data/PkmnAnimations.rxdata")
rescue

View File

@@ -889,7 +889,7 @@ module Compiler
# Save all data to PBS files
#=============================================================================
def write_all
ConsoleRGB.echo_h1 _INTL("Writing all PBS files")
Console.echo_h1 _INTL("Writing all PBS files")
write_town_map
write_connections
write_phone
@@ -911,6 +911,6 @@ module Compiler
write_metadata
write_map_metadata
echoln ""
ConsoleRGB.echo_h2("Successfully rewrote all PBS files", text: :green)
Console.echo_h2("Successfully rewrote all PBS files", text: :green)
end
end

View File

@@ -1445,7 +1445,7 @@ module Compiler
Graphics.update
trainerChecker = TrainerChecker.new
change_record = []
ConsoleRGB.echo_li _INTL("Processing {1} maps...", mapData.mapinfos.keys.length)
Console.echo_li _INTL("Processing {1} maps...", mapData.mapinfos.keys.length)
idx = 0
for id in mapData.mapinfos.keys.sort
echo "." if idx % 20 == 0
@@ -1488,12 +1488,12 @@ module Compiler
change_record.push(_INTL("Map {1}: '{2}' was modified and saved.", id, mapData.mapinfos[id].name))
end
end
ConsoleRGB.echo_complete(true)
change_record.each { |msg| ConsoleRGB.echo_warn msg }
Console.echo_done(true)
change_record.each { |msg| Console.echo_warn msg }
changed = false
Graphics.update
commonEvents = load_data("Data/CommonEvents.rxdata")
ConsoleRGB.echo_li _INTL("Processing common events...")
Console.echo_li _INTL("Processing common events...")
for key in 0...commonEvents.length
newevent = fix_event_use(commonEvents[key],0,mapData)
if newevent
@@ -1502,9 +1502,9 @@ module Compiler
end
end
save_data(commonEvents,"Data/CommonEvents.rxdata") if changed
ConsoleRGB.echo_complete(true)
Console.echo_done(true)
if change_record.length > 0 || changed
ConsoleRGB.echo_warn _INTL("RMXP data was altered. Close RMXP now to ensure changes are applied.")
Console.echo_warn _INTL("RMXP data was altered. Close RMXP now to ensure changes are applied.")
end
end
end