Standardised compiling-based console messages

This commit is contained in:
Maruno17
2022-11-05 16:18:24 +00:00
parent 6f7a714d48
commit c984fda1cf
9 changed files with 44 additions and 40 deletions

View File

@@ -705,7 +705,7 @@ def pbDebugFixInvalidTiles
t = Time.now.to_i
Graphics.update
total_maps = mapData.mapinfos.keys.length
Console.echo_h1 _INTL("Checking {1} maps for invalid tiles", total_maps)
Console.echo_h1(_INTL("Checking {1} maps for invalid tiles", total_maps))
mapData.mapinfos.keys.sort.each do |id|
if Time.now.to_i - t >= 5
Graphics.update
@@ -738,7 +738,7 @@ def pbDebugFixInvalidTiles
end
next if map_errors == 0
# Map was changed; save it
Console.echoln_li _INTL("{1} error tile(s) found on map {2}: {3}.", map_errors, id, mapData.mapinfos[id].name)
Console.echoln_li(_INTL("{1} error tile(s) found on map {2}: {3}.", map_errors, id, mapData.mapinfos[id].name))
total_errors += map_errors
num_error_maps += 1
mapData.saveMap(id)
@@ -749,7 +749,7 @@ def pbDebugFixInvalidTiles
else
echoln ""
Console.echo_h2(_INTL("Done. {1} errors found and fixed.", total_errors), text: :green)
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."))
echoln ""
pbMessage(_INTL("{1} error(s) were found across {2} map(s) and fixed.", total_errors, num_error_maps))
pbMessage(_INTL("Close RPG Maker XP to ensure the changes are applied properly."))

View File

@@ -17,7 +17,7 @@ module FilenameUpdater
def rename_berry_plant_charsets
src_dir = "Graphics/Characters/"
return false if !FileTest.directory?(src_dir)
Console.echo_li _INTL("Renaming berry tree charsets...")
Console.echo_li(_INTL("Renaming berry tree charsets..."))
ret = false
# generates a list of all graphic files
files = readDirectoryFiles(src_dir, ["berrytree*.png"])
@@ -38,7 +38,7 @@ module FilenameUpdater
mapData = Compiler::MapData.new
t = Time.now.to_i
Graphics.update
Console.echo_li _INTL("Checking {1} maps for used berry tree charsets...", mapData.mapinfos.keys.length)
Console.echo_li(_INTL("Checking {1} maps for used berry tree charsets...", mapData.mapinfos.keys.length))
idx = 0
mapData.mapinfos.keys.sort.each do |id|
echo "." if idx % 20 == 0
@@ -71,19 +71,19 @@ module FilenameUpdater
end
def rename_files
Console.echo_h1 "Updating file names and locations"
Console.echo_h1(_INTL("Updating file names and locations"))
change_record = []
# Add underscore to berry plant charsets
if rename_berry_plant_charsets
Console.echo_warn _INTL("Berry plant charset files were renamed.")
Console.echo_warn(_INTL("Berry plant charset files were renamed."))
end
change_record += update_berry_tree_event_charsets
# Warn if any map data has been changed
if !change_record.empty?
change_record.each { |msg| Console.echo_warn msg }
Console.echo_warn _INTL("RMXP data was altered. Close RMXP now to ensure changes are applied.")
change_record.each { |msg| Console.echo_warn(msg) }
Console.echo_warn(_INTL("RMXP data was altered. Close RMXP now to ensure changes are applied."))
end
echoln ""
Console.echo_h2("Finished updating file names and locations", text: :green)
Console.echo_h2(_INTL("Finished updating file names and locations"), text: :green)
end
end