mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Removed script/event text collation from compiler (added a debug function to do that instead), removed system cache reloader from compiler
This commit is contained in:
@@ -1180,6 +1180,18 @@ MenuHandlers.add(:debug_menu, :rename_files, {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
MenuHandlers.add(:debug_menu, :rename_files, {
|
||||||
|
"name" => _INTL("Collate Script/Event Texts For Translation"),
|
||||||
|
"parent" => :files_menu,
|
||||||
|
"description" => _INTL("Get translatable text from scripts/map events. Do this before extracting text."),
|
||||||
|
"effect" => proc {
|
||||||
|
Translator.gather_script_and_event_texts
|
||||||
|
MessageTypes.save_default_messages
|
||||||
|
MessageTypes.load_default_messages if safeExists?("Data/messages_core.dat")
|
||||||
|
pbMessage(_INTL("Translatable text gathered from scripts and map events and saved in data files."))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
MenuHandlers.add(:debug_menu, :extract_text, {
|
MenuHandlers.add(:debug_menu, :extract_text, {
|
||||||
"name" => _INTL("Extract Text For Translation"),
|
"name" => _INTL("Extract Text For Translation"),
|
||||||
"parent" => :files_menu,
|
"parent" => :files_menu,
|
||||||
|
|||||||
@@ -1015,14 +1015,6 @@ module Compiler
|
|||||||
compile_pbs_files
|
compile_pbs_files
|
||||||
compile_animations
|
compile_animations
|
||||||
compile_trainer_events(mustCompile)
|
compile_trainer_events(mustCompile)
|
||||||
Console.echo_li(_INTL("Saving messages..."))
|
|
||||||
Translator.gather_script_and_event_texts
|
|
||||||
MessageTypes.save_default_messages
|
|
||||||
MessageTypes.load_default_messages if safeExists?("Data/messages_core.dat")
|
|
||||||
Console.echo_done(true)
|
|
||||||
Console.echo_li(_INTL("Reloading cache..."))
|
|
||||||
System.reload_cache
|
|
||||||
Console.echo_done(true)
|
|
||||||
Console.echoln_li_done(_INTL("Successfully compiled all game data"))
|
Console.echoln_li_done(_INTL("Successfully compiled all game data"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ module Compiler
|
|||||||
# the keys are the XXX and the values are the YYY (as unprocessed strings).
|
# the keys are the XXX and the values are the YYY (as unprocessed strings).
|
||||||
idx = 0
|
idx = 0
|
||||||
pbEachFileSection(f, schema) do |contents, section_name|
|
pbEachFileSection(f, schema) do |contents, section_name|
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
data_hash = {
|
data_hash = {
|
||||||
:id => section_name.to_sym,
|
:id => section_name.to_sym,
|
||||||
@@ -390,8 +390,8 @@ module Compiler
|
|||||||
# the keys are the XXX and the values are the YYY (as unprocessed strings).
|
# the keys are the XXX and the values are the YYY (as unprocessed strings).
|
||||||
idx = 0
|
idx = 0
|
||||||
pbEachFileSection(f, schema) do |contents, section_name|
|
pbEachFileSection(f, schema) do |contents, section_name|
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
data_hash = {
|
data_hash = {
|
||||||
:id => section_name.to_sym,
|
:id => section_name.to_sym,
|
||||||
@@ -639,9 +639,9 @@ module Compiler
|
|||||||
current_type = nil
|
current_type = nil
|
||||||
idx = 0
|
idx = 0
|
||||||
pbCompilerEachPreppedLine(path) do |line, line_no|
|
pbCompilerEachPreppedLine(path) do |line, line_no|
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
next if line.length == 0
|
next if line.length == 0
|
||||||
if current_type && line[/^\d+,/] # Species line
|
if current_type && line[/^\d+,/] # Species line
|
||||||
values = line.split(",").collect! { |v| v.strip }
|
values = line.split(",").collect! { |v| v.strip }
|
||||||
@@ -777,9 +777,9 @@ module Compiler
|
|||||||
section_line = nil
|
section_line = nil
|
||||||
# Read each line of trainers.txt at a time and compile it as a trainer property
|
# Read each line of trainers.txt at a time and compile it as a trainer property
|
||||||
pbCompilerEachPreppedLine(path) do |line, line_no|
|
pbCompilerEachPreppedLine(path) do |line, line_no|
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
FileLineData.setSection(section_name, nil, section_line)
|
FileLineData.setSection(section_name, nil, section_line)
|
||||||
if line[/^\s*\[\s*(.+)\s*\]\s*$/]
|
if line[/^\s*\[\s*(.+)\s*\]\s*$/]
|
||||||
# New section [trainer_type, name] or [trainer_type, name, version]
|
# New section [trainer_type, name] or [trainer_type, name, version]
|
||||||
@@ -1061,8 +1061,8 @@ module Compiler
|
|||||||
# the keys are the XXX and the values are the YYY (as unprocessed strings).
|
# the keys are the XXX and the values are the YYY (as unprocessed strings).
|
||||||
idx = 0
|
idx = 0
|
||||||
pbEachFileSection(f) do |contents, section_name|
|
pbEachFileSection(f) do |contents, section_name|
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
schema = (section_name.to_i == 0) ? global_schema : player_schema
|
schema = (section_name.to_i == 0) ? global_schema : player_schema
|
||||||
data_hash = {
|
data_hash = {
|
||||||
@@ -1270,7 +1270,11 @@ module Compiler
|
|||||||
# end
|
# end
|
||||||
# pbanims[anim.id] = pbConvertRPGAnimation(anim) if !found
|
# pbanims[anim.id] = pbConvertRPGAnimation(anim) if !found
|
||||||
# end
|
# end
|
||||||
|
idx = 0
|
||||||
pbanims.length.times do |i|
|
pbanims.length.times do |i|
|
||||||
|
echo "." if idx % 100 == 0
|
||||||
|
Graphics.update if idx % 500 == 0
|
||||||
|
idx += 1
|
||||||
next if !pbanims[i]
|
next if !pbanims[i]
|
||||||
if pbanims[i].name[/^OppMove\:\s*(.*)$/]
|
if pbanims[i].name[/^OppMove\:\s*(.*)$/]
|
||||||
if GameData::Move.exists?($~[1])
|
if GameData::Move.exists?($~[1])
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ module Compiler
|
|||||||
# Write each element in turn
|
# Write each element in turn
|
||||||
game_data.each do |element|
|
game_data.each do |element|
|
||||||
next if element.pbs_file_suffix != path[1]
|
next if element.pbs_file_suffix != path[1]
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
if schema["SectionName"]
|
if schema["SectionName"]
|
||||||
@@ -189,8 +189,8 @@ module Compiler
|
|||||||
# Write each element in turn
|
# Write each element in turn
|
||||||
GameData::Species.each_species do |element|
|
GameData::Species.each_species do |element|
|
||||||
next if element.pbs_file_suffix != path[1]
|
next if element.pbs_file_suffix != path[1]
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
if schema["SectionName"]
|
if schema["SectionName"]
|
||||||
@@ -249,8 +249,8 @@ module Compiler
|
|||||||
GameData::Species.each do |element|
|
GameData::Species.each do |element|
|
||||||
next if element.form == 0
|
next if element.form == 0
|
||||||
next if element.pbs_file_suffix != path[1]
|
next if element.pbs_file_suffix != path[1]
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
if schema["SectionName"]
|
if schema["SectionName"]
|
||||||
@@ -317,8 +317,8 @@ module Compiler
|
|||||||
element.shadow_x == base_element.shadow_x &&
|
element.shadow_x == base_element.shadow_x &&
|
||||||
element.shadow_size == base_element.shadow_size
|
element.shadow_size == base_element.shadow_size
|
||||||
end
|
end
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
if schema["SectionName"]
|
if schema["SectionName"]
|
||||||
@@ -410,8 +410,8 @@ module Compiler
|
|||||||
add_PBS_header_to_file(f)
|
add_PBS_header_to_file(f)
|
||||||
GameData::Encounter.each do |element|
|
GameData::Encounter.each do |element|
|
||||||
next if element.pbs_file_suffix != path[1]
|
next if element.pbs_file_suffix != path[1]
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
map_name = (map_infos[element.map]) ? " # #{map_infos[element.map].name}" : ""
|
map_name = (map_infos[element.map]) ? " # #{map_infos[element.map].name}" : ""
|
||||||
@@ -463,8 +463,8 @@ module Compiler
|
|||||||
# Write each element in turn
|
# Write each element in turn
|
||||||
GameData::Trainer.each do |element|
|
GameData::Trainer.each do |element|
|
||||||
next if element.pbs_file_suffix != path[1]
|
next if element.pbs_file_suffix != path[1]
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
if schema["SectionName"]
|
if schema["SectionName"]
|
||||||
@@ -696,8 +696,8 @@ module Compiler
|
|||||||
add_PBS_header_to_file(f)
|
add_PBS_header_to_file(f)
|
||||||
GameData::MapMetadata.each do |element|
|
GameData::MapMetadata.each do |element|
|
||||||
next if element.pbs_file_suffix != path[1]
|
next if element.pbs_file_suffix != path[1]
|
||||||
echo "." if idx % 50 == 0
|
echo "." if idx % 100 == 0
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
f.write("\#-------------------------------\r\n")
|
f.write("\#-------------------------------\r\n")
|
||||||
map_name = (map_infos && map_infos[element.id]) ? map_infos[element.id].name : nil
|
map_name = (map_infos && map_infos[element.id]) ? map_infos[element.id].name : nil
|
||||||
|
|||||||
@@ -1681,9 +1681,9 @@ module Compiler
|
|||||||
Console.echo_li(_INTL("Processing {1} maps...", mapData.mapinfos.keys.length))
|
Console.echo_li(_INTL("Processing {1} maps...", mapData.mapinfos.keys.length))
|
||||||
idx = 0
|
idx = 0
|
||||||
mapData.mapinfos.keys.sort.each do |id|
|
mapData.mapinfos.keys.sort.each do |id|
|
||||||
echo "." if idx % 20 == 0
|
echo "." if idx % 100 == 0
|
||||||
idx += 1
|
idx += 1
|
||||||
Graphics.update if idx % 250 == 0
|
Graphics.update if idx % 500 == 0
|
||||||
changed = false
|
changed = false
|
||||||
map = mapData.getMap(id)
|
map = mapData.getMap(id)
|
||||||
next if !map || !mapData.mapinfos[id]
|
next if !map || !mapData.mapinfos[id]
|
||||||
|
|||||||
Reference in New Issue
Block a user