More changes to console messages

This commit is contained in:
Maruno17
2021-10-23 23:56:54 +01:00
parent e417e4c659
commit 18049c22b9
6 changed files with 162 additions and 180 deletions

View File

@@ -195,13 +195,16 @@ 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) }
echoln "Running #{conversions_to_run.length} conversions..."
echoln_warn "*** Running #{conversions_to_run.length} save file conversions ***"
echoln ""
conversions_to_run.each do |conversion|
echo "#{conversion.title}..."
echo " -> #{conversion.title}..."
conversion.run(save_data)
echoln_good "done"
end
echoln "" if conversions_to_run.length > 0
echoln_good "All save file conversions applied successfully"
echoln ""
save_data[:essentials_version] = Essentials::VERSION
save_data[:game_version] = Settings::GAME_VERSION
return true