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

@@ -195,14 +195,13 @@ module SaveData
conversions_to_run = self.get_conversions(save_data)
return false if conversions_to_run.none?
File.open(SaveData::FILE_PATH + ".bak", "wb") { |f| Marshal.dump(save_data, f) }
Console.echo_h1 "Running #{conversions_to_run.length} save file conversions"
Console.echo_h1(_INTL("Converting save file"))
conversions_to_run.each do |conversion|
Console.echo_li "#{conversion.title}..."
Console.echo_li("#{conversion.title}...")
conversion.run(save_data)
Console.echo_done(true)
end
echoln "" if conversions_to_run.length > 0
Console.echo_h2("All save file conversions applied successfully", text: :green)
Console.echoln_li_done(_INTL("Successfully applied #{conversions_to_run.length} save file conversion(s)"))
save_data[:essentials_version] = Essentials::VERSION
save_data[:game_version] = Settings::GAME_VERSION
return true