bin/rvpacker-txt in rvpacker-txt-1.9.0 vs bin/rvpacker-txt in rvpacker-txt-1.9.1

- old
+ new

@@ -15,11 +15,11 @@ other: false, system: false, scripts: false }, disable_custom_processing: false, - romanize_string: false, + romanize: false, logging: false, force: false, append: false, shuffle_level: 0 } @@ -52,11 +52,11 @@ 'it automatically replaces these symbols by their roman equivalents.']] when 'write' ["#{write_command_description}\n\nOPTIONS:\n", ['Input directory, containing folders "original" or "data" and "translation" with original game files and .txt files with translation respectively.'], ['Output directory, where an "output" folder will be created, containing compiled RPG Maker files with your translation.'], - ['Use to correctly write files back if you have parsed them with --romanize flag.',]] + ['Use to correctly write files back if you have parsed them with --romanize flag.']] else [banner_text, ['When reading: Input directory, containing folders "original" or "data" with original game files.', 'When writing: Input directory, containing folders "original" or "data" and "translation" with original game files and .txt files with translation respectively.'], ['When reading: Output directory, where a "translation" folder will be created, containing parsed .txt files with the text from the game.', @@ -94,11 +94,11 @@ options[:disable_custom_processing] = true end cmd.on('-r', '--romanize', *romanize_description) do - options[:romanize_string] = true + options[:romanize] = true end if options[:action] == 'read' cmd.on('-f', '--force', 'Force rewrite all files. Cannot be used with --append.', @@ -163,11 +163,11 @@ # @type [Boolean] force = options[:force] # @type [Boolean] append = options[:append] # @type [Boolean] -romanize = options[:romanize_string] +romanize = options[:romanize] extensions = { xp: 'rxdata', vx: 'rvdata', ace: 'rvdata2' } original_directory = Dir.glob(File.join(input_path, '{data,original}'), File::FNM_CASEFOLD).first raise '"Data" or "original" directory not found within input directory.' unless original_directory @@ -212,11 +212,11 @@ $wait_time = 0 if options[:action] == 'read' require 'read' - processing_type = if force + processing_mode = if force wait_time_start = Time.now puts "WARNING! You're about to forcefully rewrite all your translation files, including _trans files.", "If you really want to do it, make sure you've made a backup of your _trans files, if you made some changes in them already.", "Input 'Y' to continue." @@ -228,13 +228,13 @@ :append else :default end - read_map(maps_files_paths, maps_path, romanize, logging, game_type, processing_type) unless disable_processing[:maps] - read_other(other_files_paths, other_path, romanize, logging, game_type, processing_type) unless disable_processing[:other] - read_system(system_file_path, ini_file_path, other_path, romanize, logging, processing_type) unless disable_processing[:system] - read_scripts(scripts_file_path, other_path, romanize, logging, processing_type) unless disable_processing[:scripts] + read_map(maps_files_paths, maps_path, romanize, logging, game_type, processing_mode) unless disable_processing[:maps] + read_other(other_files_paths, other_path, romanize, logging, game_type, processing_mode) unless disable_processing[:other] + read_system(system_file_path, ini_file_path, other_path, romanize, logging, processing_mode) unless disable_processing[:system] + read_scripts(scripts_file_path, other_path, romanize, logging, processing_mode) unless disable_processing[:scripts] else require 'write' output_path = File.join(output_path, 'output') FileUtils.mkdir_p(output_path)