mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Standardised compiling-based console messages
This commit is contained in:
@@ -740,12 +740,12 @@ module Compiler
|
||||
#=============================================================================
|
||||
def compile_pbs_file_message_start(filename)
|
||||
# The `` around the file's name turns it cyan
|
||||
Console.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
|
||||
Console.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
|
||||
@@ -780,25 +780,25 @@ module Compiler
|
||||
end
|
||||
|
||||
def compile_all(mustCompile)
|
||||
Console.echo_h1(_INTL("Checking game data"))
|
||||
if !mustCompile
|
||||
Console.echo_h1(_INTL("Game did not compile data"))
|
||||
Console.echoln_li(_INTL("Game data was not compiled"))
|
||||
echoln ""
|
||||
return
|
||||
end
|
||||
FileLineData.clear
|
||||
Console.echo_h1 _INTL("Compiling all data")
|
||||
compile_pbs_files
|
||||
compile_animations
|
||||
compile_trainer_events(mustCompile)
|
||||
Console.echo_li _INTL("Saving messages...")
|
||||
Console.echo_li(_INTL("Saving messages..."))
|
||||
pbSetTextMessages
|
||||
MessageTypes.saveMessages
|
||||
MessageTypes.loadMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat")
|
||||
Console.echo_done(true)
|
||||
Console.echo_li _INTL("Reloading cache...")
|
||||
Console.echo_li(_INTL("Reloading cache..."))
|
||||
System.reload_cache
|
||||
Console.echo_done(true)
|
||||
echoln ""
|
||||
Console.echo_h2("Successfully compiled all data", text: :green)
|
||||
Console.echoln_li_done(_INTL("Successfully compiled all game data"))
|
||||
end
|
||||
|
||||
def main
|
||||
|
||||
@@ -1956,7 +1956,7 @@ module Compiler
|
||||
# Compile battle animations
|
||||
#=============================================================================
|
||||
def compile_animations
|
||||
Console.echo_li _INTL("Compiling animations...")
|
||||
Console.echo_li(_INTL("Compiling animations..."))
|
||||
begin
|
||||
pbanims = load_data("Data/PkmnAnimations.rxdata")
|
||||
rescue
|
||||
|
||||
@@ -962,7 +962,7 @@ module Compiler
|
||||
# Save all data to PBS files
|
||||
#=============================================================================
|
||||
def write_all
|
||||
Console.echo_h1 _INTL("Writing all PBS files")
|
||||
Console.echo_h1(_INTL("Writing all PBS files"))
|
||||
write_town_map
|
||||
write_connections
|
||||
write_types
|
||||
@@ -986,6 +986,6 @@ module Compiler
|
||||
write_dungeon_parameters
|
||||
write_phone
|
||||
echoln ""
|
||||
Console.echo_h2("Successfully rewrote all PBS files", text: :green)
|
||||
Console.echo_h2(_INTL("Successfully rewrote all PBS files"), text: :green)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1681,7 +1681,7 @@ module Compiler
|
||||
Graphics.update
|
||||
trainerChecker = TrainerChecker.new
|
||||
change_record = []
|
||||
Console.echo_li _INTL("Processing {1} maps...", mapData.mapinfos.keys.length)
|
||||
Console.echo_li(_INTL("Processing {1} maps...", mapData.mapinfos.keys.length))
|
||||
idx = 0
|
||||
mapData.mapinfos.keys.sort.each do |id|
|
||||
echo "." if idx % 20 == 0
|
||||
@@ -1725,11 +1725,11 @@ module Compiler
|
||||
end
|
||||
end
|
||||
Console.echo_done(true)
|
||||
change_record.each { |msg| Console.echo_warn msg }
|
||||
change_record.each { |msg| Console.echo_warn(msg) }
|
||||
changed = false
|
||||
Graphics.update
|
||||
commonEvents = load_data("Data/CommonEvents.rxdata")
|
||||
Console.echo_li _INTL("Processing common events...")
|
||||
Console.echo_li(_INTL("Processing common events..."))
|
||||
commonEvents.length.times do |key|
|
||||
newevent = fix_event_use(commonEvents[key], 0, mapData)
|
||||
if newevent
|
||||
@@ -1740,7 +1740,7 @@ module Compiler
|
||||
save_data(commonEvents, "Data/CommonEvents.rxdata") if changed
|
||||
Console.echo_done(true)
|
||||
if change_record.length > 0 || changed
|
||||
Console.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
|
||||
|
||||
Reference in New Issue
Block a user