mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Made Compiler more modular
This commit is contained in:
@@ -1378,7 +1378,7 @@ MenuHandlers.add(:debug_menu, :create_pbs_files, {
|
|||||||
loop do
|
loop do
|
||||||
cmd = pbShowCommands(nil, cmds, -1, cmd)
|
cmd = pbShowCommands(nil, cmds, -1, cmd)
|
||||||
case cmd
|
case cmd
|
||||||
when 0 then Compiler.write_all
|
when 0 then Compiler.write_all_pbs_files
|
||||||
when 1 then Compiler.write_abilities
|
when 1 then Compiler.write_abilities
|
||||||
when 2 then Compiler.write_trainer_lists
|
when 2 then Compiler.write_trainer_lists
|
||||||
when 3 then Compiler.write_berry_plants
|
when 3 then Compiler.write_berry_plants
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ end
|
|||||||
# Compiler
|
# Compiler
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
module Compiler
|
module Compiler
|
||||||
|
@@categories = {}
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
def findIndex(a)
|
def findIndex(a)
|
||||||
@@ -89,9 +91,9 @@ module Compiler
|
|||||||
return csvQuote(str, true)
|
return csvQuote(str, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# PBS file readers
|
# PBS file readers
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def pbEachFileSectionEx(f, schema = nil)
|
def pbEachFileSectionEx(f, schema = nil)
|
||||||
lineno = 1
|
lineno = 1
|
||||||
havesection = false
|
havesection = false
|
||||||
@@ -248,10 +250,10 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Splits a string containing comma-separated values into an array of those
|
# Splits a string containing comma-separated values into an array of those
|
||||||
# values.
|
# values.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def split_csv_line(string)
|
def split_csv_line(string)
|
||||||
# Split the string into an array of values, using a comma as the separator
|
# Split the string into an array of values, using a comma as the separator
|
||||||
values = string.split(",")
|
values = string.split(",")
|
||||||
@@ -292,9 +294,9 @@ module Compiler
|
|||||||
return values
|
return values
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Convert a string to certain kinds of values
|
# Convert a string to certain kinds of values
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Unused
|
# Unused
|
||||||
# NOTE: This method is about 10 times slower than split_csv_line.
|
# NOTE: This method is about 10 times slower than split_csv_line.
|
||||||
def csvfield!(str)
|
def csvfield!(str)
|
||||||
@@ -508,9 +510,9 @@ module Compiler
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Convert a string to values using a schema
|
# Convert a string to values using a schema
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Unused
|
# Unused
|
||||||
# @deprecated This method is slated to be removed in v22.
|
# @deprecated This method is slated to be removed in v22.
|
||||||
def pbGetCsvRecord(rec, lineno, schema)
|
def pbGetCsvRecord(rec, lineno, schema)
|
||||||
@@ -684,9 +686,9 @@ module Compiler
|
|||||||
return (!repeat && schema_length == 1) ? record[0] : record
|
return (!repeat && schema_length == 1) ? record[0] : record
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Convert a string to values using a schema
|
# Convert a string to values using a schema
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def get_csv_record(rec, schema)
|
def get_csv_record(rec, schema)
|
||||||
ret = []
|
ret = []
|
||||||
repeat = false
|
repeat = false
|
||||||
@@ -736,9 +738,9 @@ module Compiler
|
|||||||
return (!repeat && schema_length == 1) ? ret[0] : ret
|
return (!repeat && schema_length == 1) ? ret[0] : ret
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Write values to a file using a schema
|
# Write values to a file using a schema
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def pbWriteCsvRecord(record, file, schema)
|
def pbWriteCsvRecord(record, file, schema)
|
||||||
rec = (record.is_a?(Array)) ? record.flatten : [record]
|
rec = (record.is_a?(Array)) ? record.flatten : [record]
|
||||||
start = (["*", "^"].include?(schema[1][0, 1])) ? 1 : 0
|
start = (["*", "^"].include?(schema[1][0, 1])) ? 1 : 0
|
||||||
@@ -841,10 +843,10 @@ module Compiler
|
|||||||
return record
|
return record
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Parse string into a likely constant name and return its ID number (if any).
|
# Parse string into a likely constant name and return its ID number (if any).
|
||||||
# Last ditch attempt to figure out whether a constant is defined.
|
# Last ditch attempt to figure out whether a constant is defined.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Unused
|
# Unused
|
||||||
def pbGetConst(mod, item, err)
|
def pbGetConst(mod, item, err)
|
||||||
isDef = false
|
isDef = false
|
||||||
@@ -918,9 +920,9 @@ module Compiler
|
|||||||
return typ.id
|
return typ.id
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Replace text in PBS files before compiling them
|
# Replace text in PBS files before compiling them
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def edit_and_rewrite_pbs_file_text(filename)
|
def edit_and_rewrite_pbs_file_text(filename)
|
||||||
return if !block_given?
|
return if !block_given?
|
||||||
lines = []
|
lines = []
|
||||||
@@ -946,160 +948,40 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile all data
|
# Compile all data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_pbs_file_message_start(filename)
|
def categories_to_compile(all_categories = false)
|
||||||
# The `` around the file's name turns it cyan
|
ret = []
|
||||||
Console.echo_li(_INTL("Compiling PBS file `{1}`...", filename.split("/").last))
|
Input.update
|
||||||
end
|
if all_categories || $full_compile || Input.press?(Input::CTRL)
|
||||||
|
ret = @@categories.keys.clone
|
||||||
def write_pbs_file_message_start(filename)
|
return ret
|
||||||
# The `` around the file's name turns it cyan
|
|
||||||
Console.echo_li(_INTL("Writing PBS file `{1}`...", filename.split("/").last))
|
|
||||||
end
|
|
||||||
|
|
||||||
def process_pbs_file_message_end
|
|
||||||
Console.echo_done(true)
|
|
||||||
Graphics.update
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_all_pbs_files_to_compile
|
|
||||||
# Get the GameData classes and their respective base PBS filenames
|
|
||||||
ret = GameData.get_all_pbs_base_filenames
|
|
||||||
ret.merge!({
|
|
||||||
:BattleFacility => "battle_facility_lists",
|
|
||||||
:Connection => "map_connections",
|
|
||||||
:RegionalDex => "regional_dexes"
|
|
||||||
})
|
|
||||||
ret.each { |key, val| ret[key] = [val] } # [base_filename, ["PBS/file.txt", etc.]]
|
|
||||||
# Look through all PBS files and match them to a GameData class based on
|
|
||||||
# their base filenames
|
|
||||||
text_files_keys = ret.keys.sort! { |a, b| ret[b][0].length <=> ret[a][0].length }
|
|
||||||
Dir.chdir("PBS/") do
|
|
||||||
Dir.glob("*.txt") do |f|
|
|
||||||
base_name = File.basename(f, ".txt")
|
|
||||||
text_files_keys.each do |key|
|
|
||||||
next if base_name != ret[key][0] && !f.start_with?(ret[key][0] + "_")
|
|
||||||
ret[key][1] ||= []
|
|
||||||
ret[key][1].push("PBS/" + f)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@@categories.each_pair do |category, procs|
|
||||||
|
ret.push(category) if procs[:should_compile]&.call
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
def compile_pbs_files
|
def compile_all(all_categories = false)
|
||||||
text_files = get_all_pbs_files_to_compile
|
|
||||||
modify_pbs_file_contents_before_compiling
|
|
||||||
compile_town_map(*text_files[:TownMap][1])
|
|
||||||
compile_connections(*text_files[:Connection][1])
|
|
||||||
compile_types(*text_files[:Type][1])
|
|
||||||
compile_abilities(*text_files[:Ability][1])
|
|
||||||
compile_moves(*text_files[:Move][1]) # Depends on Type
|
|
||||||
compile_items(*text_files[:Item][1]) # Depends on Move
|
|
||||||
compile_berry_plants(*text_files[:BerryPlant][1]) # Depends on Item
|
|
||||||
compile_pokemon(*text_files[:Species][1]) # Depends on Move, Item, Type, Ability
|
|
||||||
compile_pokemon_forms(*text_files[:Species1][1]) # Depends on Species, Move, Item, Type, Ability
|
|
||||||
compile_pokemon_metrics(*text_files[:SpeciesMetrics][1]) # Depends on Species
|
|
||||||
compile_shadow_pokemon(*text_files[:ShadowPokemon][1]) # Depends on Species
|
|
||||||
compile_regional_dexes(*text_files[:RegionalDex][1]) # Depends on Species
|
|
||||||
compile_ribbons(*text_files[:Ribbon][1])
|
|
||||||
compile_encounters(*text_files[:Encounter][1]) # Depends on Species
|
|
||||||
compile_trainer_types(*text_files[:TrainerType][1])
|
|
||||||
compile_trainers(*text_files[:Trainer][1]) # Depends on Species, Item, Move
|
|
||||||
compile_trainer_lists # Depends on TrainerType
|
|
||||||
compile_metadata(*text_files[:Metadata][1]) # Depends on TrainerType
|
|
||||||
compile_map_metadata(*text_files[:MapMetadata][1])
|
|
||||||
compile_dungeon_tilesets(*text_files[:DungeonTileset][1])
|
|
||||||
compile_dungeon_parameters(*text_files[:DungeonParameters][1])
|
|
||||||
compile_phone(*text_files[:PhoneMessage][1]) # Depends on TrainerType
|
|
||||||
end
|
|
||||||
|
|
||||||
def compile_all(mustCompile)
|
|
||||||
Console.echo_h1(_INTL("Checking game data"))
|
|
||||||
if !mustCompile
|
|
||||||
Console.echoln_li(_INTL("Game data was not compiled"))
|
|
||||||
echoln ""
|
|
||||||
return
|
|
||||||
end
|
|
||||||
FileLineData.clear
|
FileLineData.clear
|
||||||
compile_pbs_files
|
to_compile = categories_to_compile(all_categories)
|
||||||
compile_animations
|
@@categories.each_pair do |category, procs|
|
||||||
compile_trainer_events(mustCompile)
|
Console.echo_h1(procs[:header_text]&.call || _INTL("Compiling {1}", category))
|
||||||
Console.echo_li(_INTL("Saving messages..."))
|
if to_compile.include?(category)
|
||||||
Translator.gather_script_and_event_texts
|
@@categories[category][:compile].call
|
||||||
MessageTypes.save_default_messages
|
else
|
||||||
MessageTypes.load_default_messages if FileTest.exist?("Data/messages_core.dat")
|
Console.echoln_li(procs[:skipped_text]&.call || _INTL("Not compiled"))
|
||||||
Console.echo_done(true)
|
end
|
||||||
Console.echoln_li_done(_INTL("Successfully compiled all game data"))
|
echoln ""
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def main
|
def main
|
||||||
return if !$DEBUG
|
return if !$DEBUG
|
||||||
begin
|
begin
|
||||||
mustCompile = false
|
compile_all
|
||||||
# If no PBS file, create one and fill it, then recompile
|
|
||||||
if !FileTest.directory?("PBS")
|
|
||||||
Dir.mkdir("PBS") rescue nil
|
|
||||||
GameData.load_all
|
|
||||||
write_all
|
|
||||||
mustCompile = true
|
|
||||||
end
|
|
||||||
# Get all data files and PBS files to be checked for their last modified times
|
|
||||||
data_files = GameData.get_all_data_filenames
|
|
||||||
data_files += [ # Extra .dat files for data that isn't a GameData class
|
|
||||||
["map_connections.dat", true],
|
|
||||||
["regional_dexes.dat", true],
|
|
||||||
["trainer_lists.dat", true]
|
|
||||||
]
|
|
||||||
text_files = get_all_pbs_files_to_compile
|
|
||||||
latestDataTime = 0
|
|
||||||
latestTextTime = 0
|
|
||||||
# Should recompile if new maps were imported
|
|
||||||
mustCompile |= import_new_maps
|
|
||||||
# Check data files for their latest modify time
|
|
||||||
data_files.each do |filename| # filename = [string, boolean (whether mandatory)]
|
|
||||||
if FileTest.exist?("Data/" + filename[0])
|
|
||||||
begin
|
|
||||||
File.open("Data/#{filename[0]}") do |file|
|
|
||||||
latestDataTime = [latestDataTime, file.mtime.to_i].max
|
|
||||||
end
|
|
||||||
rescue SystemCallError
|
|
||||||
mustCompile = true
|
|
||||||
end
|
|
||||||
elsif filename[1]
|
|
||||||
mustCompile = true
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
# Check PBS files for their latest modify time
|
|
||||||
text_files.each do |key, value|
|
|
||||||
next if !value || !value[1].is_a?(Array)
|
|
||||||
value[1].each do |filepath|
|
|
||||||
begin
|
|
||||||
File.open(filepath) { |file| latestTextTime = [latestTextTime, file.mtime.to_i].max }
|
|
||||||
rescue SystemCallError
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
# Decide to compile if a PBS file was edited more recently than any .dat files
|
|
||||||
mustCompile |= (latestTextTime >= latestDataTime)
|
|
||||||
# Should recompile if holding Ctrl
|
|
||||||
Input.update
|
|
||||||
mustCompile = true if $full_compile || Input.press?(Input::CTRL)
|
|
||||||
# Delete old data files in preparation for recompiling
|
|
||||||
if mustCompile
|
|
||||||
data_files.each do |filename|
|
|
||||||
begin
|
|
||||||
File.delete("Data/#{filename[0]}") if FileTest.exist?("Data/#{filename[0]}")
|
|
||||||
rescue SystemCallError
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
# Recompile all data
|
|
||||||
compile_all(mustCompile)
|
|
||||||
rescue Exception
|
rescue Exception
|
||||||
e = $!
|
e = $!
|
||||||
raise e if e.class.to_s == "Reset" || e.is_a?(Reset) || e.is_a?(SystemExit)
|
raise e if e.class.to_s == "Reset" || e.is_a?(Reset) || e.is_a?(SystemExit)
|
||||||
|
|||||||
@@ -1,6 +1,139 @@
|
|||||||
module Compiler
|
module Compiler
|
||||||
|
@@categories[:pbs_files] = {
|
||||||
|
:should_compile => proc { next should_compile_pbs_files? },
|
||||||
|
:header_text => proc { next _INTL("Compiling PBS files") },
|
||||||
|
:skipped_text => proc { next _INTL("Not compiled") },
|
||||||
|
:compile => proc {
|
||||||
|
# Delete old data files in preparation for recompiling
|
||||||
|
get_all_pbs_data_filenames_to_compile.each do |filename|
|
||||||
|
begin
|
||||||
|
File.delete("Data/#{filename[0]}") if FileTest.exist?("Data/#{filename[0]}")
|
||||||
|
rescue SystemCallError
|
||||||
|
end
|
||||||
|
end
|
||||||
|
compile_pbs_files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
|
def get_all_pbs_data_filenames_to_compile
|
||||||
|
ret = GameData.get_all_data_filenames
|
||||||
|
ret += [ # Extra .dat files for data that isn't a GameData class
|
||||||
|
["map_connections.dat", true],
|
||||||
|
["regional_dexes.dat", true],
|
||||||
|
["trainer_lists.dat", true]
|
||||||
|
]
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_all_pbs_files_to_compile
|
||||||
|
# Get the GameData classes and their respective base PBS filenames
|
||||||
|
ret = GameData.get_all_pbs_base_filenames
|
||||||
|
ret.merge!({
|
||||||
|
:BattleFacility => "battle_facility_lists",
|
||||||
|
:Connection => "map_connections",
|
||||||
|
:RegionalDex => "regional_dexes"
|
||||||
|
})
|
||||||
|
ret.each { |key, val| ret[key] = [val] } # [base_filename, ["PBS/file.txt", etc.]]
|
||||||
|
# Look through all PBS files and match them to a GameData class based on
|
||||||
|
# their base filenames
|
||||||
|
text_files_keys = ret.keys.sort! { |a, b| ret[b][0].length <=> ret[a][0].length }
|
||||||
|
Dir.chdir("PBS/") do
|
||||||
|
Dir.glob("*.txt") do |f|
|
||||||
|
base_name = File.basename(f, ".txt")
|
||||||
|
text_files_keys.each do |key|
|
||||||
|
next if base_name != ret[key][0] && !f.start_with?(ret[key][0] + "_")
|
||||||
|
ret[key][1] ||= []
|
||||||
|
ret[key][1].push("PBS/" + f)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
|
def should_compile_pbs_files?
|
||||||
|
# If no PBS folder exists, create one and fill it, then recompile
|
||||||
|
if !FileTest.directory?("PBS")
|
||||||
|
Dir.mkdir("PBS") rescue nil
|
||||||
|
GameData.load_all
|
||||||
|
write_all_pbs_files
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
# Get all data files and PBS files to be checked for their last modified times
|
||||||
|
data_files = get_all_pbs_data_filenames_to_compile
|
||||||
|
text_files = get_all_pbs_files_to_compile
|
||||||
|
# Check data files for their latest modify time
|
||||||
|
latest_data_write_time = 0
|
||||||
|
data_files.each do |filename| # filename = [string, boolean (whether mandatory)]
|
||||||
|
if FileTest.exist?("Data/" + filename[0])
|
||||||
|
begin
|
||||||
|
File.open("Data/#{filename[0]}") do |file|
|
||||||
|
latest_data_write_time = [latest_data_write_time, file.mtime.to_i].max
|
||||||
|
end
|
||||||
|
rescue SystemCallError
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elsif filename[1]
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# Check PBS files for their latest modify time
|
||||||
|
latest_text_edit_time = 0
|
||||||
|
text_files.each_value do |value|
|
||||||
|
next if !value || !value[1].is_a?(Array)
|
||||||
|
value[1].each do |filepath|
|
||||||
|
begin
|
||||||
|
File.open(filepath) { |file| latest_text_edit_time = [latest_text_edit_time, file.mtime.to_i].max }
|
||||||
|
rescue SystemCallError
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# Decide to compile if a PBS file was edited more recently than any .dat files
|
||||||
|
return (latest_text_edit_time >= latest_data_write_time)
|
||||||
|
end
|
||||||
|
|
||||||
|
def compile_pbs_files
|
||||||
|
text_files = get_all_pbs_files_to_compile
|
||||||
|
modify_pbs_file_contents_before_compiling
|
||||||
|
compile_town_map(*text_files[:TownMap][1])
|
||||||
|
compile_connections(*text_files[:Connection][1])
|
||||||
|
compile_types(*text_files[:Type][1])
|
||||||
|
compile_abilities(*text_files[:Ability][1])
|
||||||
|
compile_moves(*text_files[:Move][1]) # Depends on Type
|
||||||
|
compile_items(*text_files[:Item][1]) # Depends on Move
|
||||||
|
compile_berry_plants(*text_files[:BerryPlant][1]) # Depends on Item
|
||||||
|
compile_pokemon(*text_files[:Species][1]) # Depends on Move, Item, Type, Ability
|
||||||
|
compile_pokemon_forms(*text_files[:Species1][1]) # Depends on Species, Move, Item, Type, Ability
|
||||||
|
compile_pokemon_metrics(*text_files[:SpeciesMetrics][1]) # Depends on Species
|
||||||
|
compile_shadow_pokemon(*text_files[:ShadowPokemon][1]) # Depends on Species
|
||||||
|
compile_regional_dexes(*text_files[:RegionalDex][1]) # Depends on Species
|
||||||
|
compile_ribbons(*text_files[:Ribbon][1])
|
||||||
|
compile_encounters(*text_files[:Encounter][1]) # Depends on Species
|
||||||
|
compile_trainer_types(*text_files[:TrainerType][1])
|
||||||
|
compile_trainers(*text_files[:Trainer][1]) # Depends on Species, Item, Move
|
||||||
|
compile_trainer_lists # Depends on TrainerType
|
||||||
|
compile_metadata(*text_files[:Metadata][1]) # Depends on TrainerType
|
||||||
|
compile_map_metadata(*text_files[:MapMetadata][1])
|
||||||
|
compile_dungeon_tilesets(*text_files[:DungeonTileset][1])
|
||||||
|
compile_dungeon_parameters(*text_files[:DungeonParameters][1])
|
||||||
|
compile_phone(*text_files[:PhoneMessage][1]) # Depends on TrainerType
|
||||||
|
end
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Generic methods used when compiling PBS files
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
def compile_pbs_file_message_start(filename)
|
||||||
|
# The `` around the file's name turns it cyan
|
||||||
|
Console.echo_li(_INTL("Compiling PBS file `{1}`...", filename.split("/").last))
|
||||||
|
end
|
||||||
|
|
||||||
|
def process_pbs_file_message_end
|
||||||
|
Console.echo_done(true)
|
||||||
|
Graphics.update
|
||||||
|
end
|
||||||
|
|
||||||
def compile_PBS_file_generic(game_data, *paths)
|
def compile_PBS_file_generic(game_data, *paths)
|
||||||
if game_data.const_defined?(:OPTIONAL) && game_data::OPTIONAL
|
if game_data.const_defined?(:OPTIONAL) && game_data::OPTIONAL
|
||||||
return if paths.none? { |p| FileTest.exist?(p) }
|
return if paths.none? { |p| FileTest.exist?(p) }
|
||||||
@@ -67,9 +200,9 @@ module Compiler
|
|||||||
game_data.save
|
game_data.save
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Town Map data
|
# Compile Town Map data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_town_map(*paths)
|
def compile_town_map(*paths)
|
||||||
compile_PBS_file_generic(GameData::TownMap, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::TownMap, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_town_maps : validate_compiled_town_map(hash)
|
(final_validate) ? validate_all_compiled_town_maps : validate_compiled_town_map(hash)
|
||||||
@@ -98,9 +231,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::REGION_LOCATION_DESCRIPTIONS, interest_names)
|
MessageTypes.setMessagesAsHash(MessageTypes::REGION_LOCATION_DESCRIPTIONS, interest_names)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile map connections
|
# Compile map connections
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_connections(*paths)
|
def compile_connections(*paths)
|
||||||
hashenum = {
|
hashenum = {
|
||||||
"N" => "N", "North" => "N",
|
"N" => "N", "North" => "N",
|
||||||
@@ -137,9 +270,9 @@ module Compiler
|
|||||||
save_data(records, "Data/map_connections.dat")
|
save_data(records, "Data/map_connections.dat")
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile type data
|
# Compile type data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_types(*paths)
|
def compile_types(*paths)
|
||||||
compile_PBS_file_generic(GameData::Type, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::Type, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_types : validate_compiled_type(hash)
|
(final_validate) ? validate_all_compiled_types : validate_compiled_type(hash)
|
||||||
@@ -175,9 +308,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::TYPE_NAMES, type_names)
|
MessageTypes.setMessagesAsHash(MessageTypes::TYPE_NAMES, type_names)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile ability data
|
# Compile ability data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_abilities(*paths)
|
def compile_abilities(*paths)
|
||||||
compile_PBS_file_generic(GameData::Ability, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::Ability, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_abilities : validate_compiled_ability(hash)
|
(final_validate) ? validate_all_compiled_abilities : validate_compiled_ability(hash)
|
||||||
@@ -199,9 +332,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::ABILITY_DESCRIPTIONS, ability_descriptions)
|
MessageTypes.setMessagesAsHash(MessageTypes::ABILITY_DESCRIPTIONS, ability_descriptions)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile move data
|
# Compile move data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_moves(*paths)
|
def compile_moves(*paths)
|
||||||
compile_PBS_file_generic(GameData::Move, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::Move, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_moves : validate_compiled_move(hash)
|
(final_validate) ? validate_all_compiled_moves : validate_compiled_move(hash)
|
||||||
@@ -229,9 +362,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::MOVE_DESCRIPTIONS, move_descriptions)
|
MessageTypes.setMessagesAsHash(MessageTypes::MOVE_DESCRIPTIONS, move_descriptions)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile item data
|
# Compile item data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_items(*paths)
|
def compile_items(*paths)
|
||||||
compile_PBS_file_generic(GameData::Item, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::Item, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_items : validate_compiled_item(hash)
|
(final_validate) ? validate_all_compiled_items : validate_compiled_item(hash)
|
||||||
@@ -262,9 +395,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::ITEM_DESCRIPTIONS, item_descriptions)
|
MessageTypes.setMessagesAsHash(MessageTypes::ITEM_DESCRIPTIONS, item_descriptions)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile berry plant data
|
# Compile berry plant data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_berry_plants(*paths)
|
def compile_berry_plants(*paths)
|
||||||
compile_PBS_file_generic(GameData::BerryPlant, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::BerryPlant, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_berry_plants : validate_compiled_berry_plant(hash)
|
(final_validate) ? validate_all_compiled_berry_plants : validate_compiled_berry_plant(hash)
|
||||||
@@ -277,9 +410,9 @@ module Compiler
|
|||||||
def validate_all_compiled_berry_plants
|
def validate_all_compiled_berry_plants
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Pokémon data
|
# Compile Pokémon data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_pokemon(*paths)
|
def compile_pokemon(*paths)
|
||||||
compile_PBS_file_generic(GameData::Species, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::Species, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_pokemon : validate_compiled_pokemon(hash)
|
(final_validate) ? validate_all_compiled_pokemon : validate_compiled_pokemon(hash)
|
||||||
@@ -380,11 +513,11 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::POKEDEX_ENTRIES, species_pokedex_entries)
|
MessageTypes.setMessagesAsHash(MessageTypes::POKEDEX_ENTRIES, species_pokedex_entries)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Pokémon forms data
|
# Compile Pokémon forms data
|
||||||
# NOTE: Doesn't use compile_PBS_file_generic because it needs its own schema
|
# NOTE: Doesn't use compile_PBS_file_generic because it needs its own schema
|
||||||
# and shouldn't clear GameData::Species at the start.
|
# and shouldn't clear GameData::Species at the start.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_pokemon_forms(*paths)
|
def compile_pokemon_forms(*paths)
|
||||||
schema = GameData::Species.schema(true)
|
schema = GameData::Species.schema(true)
|
||||||
# Read from PBS file(s)
|
# Read from PBS file(s)
|
||||||
@@ -537,9 +670,9 @@ module Compiler
|
|||||||
MessageTypes.addMessagesAsHash(MessageTypes::POKEDEX_ENTRIES, species_pokedex_entries)
|
MessageTypes.addMessagesAsHash(MessageTypes::POKEDEX_ENTRIES, species_pokedex_entries)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Pokémon metrics data
|
# Compile Pokémon metrics data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_pokemon_metrics(*paths)
|
def compile_pokemon_metrics(*paths)
|
||||||
compile_PBS_file_generic(GameData::SpeciesMetrics, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::SpeciesMetrics, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_pokemon_metrics : validate_compiled_pokemon_metrics(hash)
|
(final_validate) ? validate_all_compiled_pokemon_metrics : validate_compiled_pokemon_metrics(hash)
|
||||||
@@ -562,9 +695,9 @@ module Compiler
|
|||||||
def validate_all_compiled_pokemon_metrics
|
def validate_all_compiled_pokemon_metrics
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Shadow Pokémon data
|
# Compile Shadow Pokémon data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_shadow_pokemon(*paths)
|
def compile_shadow_pokemon(*paths)
|
||||||
compile_PBS_file_generic(GameData::ShadowPokemon, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::ShadowPokemon, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_shadow_pokemon : validate_compiled_shadow_pokemon(hash)
|
(final_validate) ? validate_all_compiled_shadow_pokemon : validate_compiled_shadow_pokemon(hash)
|
||||||
@@ -587,9 +720,9 @@ module Compiler
|
|||||||
def validate_all_compiled_shadow_pokemon
|
def validate_all_compiled_shadow_pokemon
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Regional Dexes
|
# Compile Regional Dexes
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_regional_dexes(*paths)
|
def compile_regional_dexes(*paths)
|
||||||
dex_lists = []
|
dex_lists = []
|
||||||
paths.each do |path|
|
paths.each do |path|
|
||||||
@@ -628,9 +761,9 @@ module Compiler
|
|||||||
save_data(dex_lists, "Data/regional_dexes.dat")
|
save_data(dex_lists, "Data/regional_dexes.dat")
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile ribbon data
|
# Compile ribbon data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_ribbons(*paths)
|
def compile_ribbons(*paths)
|
||||||
compile_PBS_file_generic(GameData::Ribbon, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::Ribbon, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_ribbons : validate_compiled_ribbon(hash)
|
(final_validate) ? validate_all_compiled_ribbons : validate_compiled_ribbon(hash)
|
||||||
@@ -652,9 +785,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::RIBBON_DESCRIPTIONS, ribbon_descriptions)
|
MessageTypes.setMessagesAsHash(MessageTypes::RIBBON_DESCRIPTIONS, ribbon_descriptions)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile wild encounter data
|
# Compile wild encounter data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_encounters(*paths)
|
def compile_encounters(*paths)
|
||||||
GameData::Encounter::DATA.clear
|
GameData::Encounter::DATA.clear
|
||||||
max_level = GameData::GrowthRate.max_level
|
max_level = GameData::GrowthRate.max_level
|
||||||
@@ -764,9 +897,9 @@ module Compiler
|
|||||||
GameData::Encounter.save
|
GameData::Encounter.save
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile trainer type data
|
# Compile trainer type data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_trainer_types(*paths)
|
def compile_trainer_types(*paths)
|
||||||
compile_PBS_file_generic(GameData::TrainerType, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::TrainerType, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_trainer_types : validate_compiled_trainer_type(hash)
|
(final_validate) ? validate_all_compiled_trainer_types : validate_compiled_trainer_type(hash)
|
||||||
@@ -791,9 +924,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::TRAINER_TYPE_NAMES, trainer_type_names)
|
MessageTypes.setMessagesAsHash(MessageTypes::TRAINER_TYPE_NAMES, trainer_type_names)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile individual trainer data
|
# Compile individual trainer data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_trainers(*paths)
|
def compile_trainers(*paths)
|
||||||
GameData::Trainer::DATA.clear
|
GameData::Trainer::DATA.clear
|
||||||
schema = GameData::Trainer.schema
|
schema = GameData::Trainer.schema
|
||||||
@@ -951,9 +1084,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::POKEMON_NICKNAMES, pokemon_nicknames)
|
MessageTypes.setMessagesAsHash(MessageTypes::POKEMON_NICKNAMES, pokemon_nicknames)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile Battle Tower and other Cups trainers/Pokémon
|
# Compile Battle Tower and other Cups trainers/Pokémon
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_trainer_lists(path = "PBS/battle_facility_lists.txt")
|
def compile_trainer_lists(path = "PBS/battle_facility_lists.txt")
|
||||||
compile_pbs_file_message_start(path)
|
compile_pbs_file_message_start(path)
|
||||||
btTrainersRequiredTypes = {
|
btTrainersRequiredTypes = {
|
||||||
@@ -1068,11 +1201,11 @@ module Compiler
|
|||||||
return sections
|
return sections
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile metadata
|
# Compile metadata
|
||||||
# NOTE: Doesn't use compile_PBS_file_generic because it contains data for two
|
# NOTE: Doesn't use compile_PBS_file_generic because it contains data for two
|
||||||
# different GameData classes.
|
# different GameData classes.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_metadata(*paths)
|
def compile_metadata(*paths)
|
||||||
GameData::Metadata::DATA.clear
|
GameData::Metadata::DATA.clear
|
||||||
GameData::PlayerMetadata::DATA.clear
|
GameData::PlayerMetadata::DATA.clear
|
||||||
@@ -1173,9 +1306,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::STORAGE_CREATOR_NAME, storage_creator)
|
MessageTypes.setMessagesAsHash(MessageTypes::STORAGE_CREATOR_NAME, storage_creator)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile map metadata
|
# Compile map metadata
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_map_metadata(*paths)
|
def compile_map_metadata(*paths)
|
||||||
compile_PBS_file_generic(GameData::MapMetadata, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::MapMetadata, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_map_metadata : validate_compiled_map_metadata(hash)
|
(final_validate) ? validate_all_compiled_map_metadata : validate_compiled_map_metadata(hash)
|
||||||
@@ -1196,9 +1329,9 @@ module Compiler
|
|||||||
MessageTypes.setMessagesAsHash(MessageTypes::MAP_NAMES, map_names)
|
MessageTypes.setMessagesAsHash(MessageTypes::MAP_NAMES, map_names)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile dungeon tileset data
|
# Compile dungeon tileset data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_dungeon_tilesets(*paths)
|
def compile_dungeon_tilesets(*paths)
|
||||||
compile_PBS_file_generic(GameData::DungeonTileset, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::DungeonTileset, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_dungeon_tilesets : validate_compiled_dungeon_tileset(hash)
|
(final_validate) ? validate_all_compiled_dungeon_tilesets : validate_compiled_dungeon_tileset(hash)
|
||||||
@@ -1211,9 +1344,9 @@ module Compiler
|
|||||||
def validate_all_compiled_dungeon_tilesets
|
def validate_all_compiled_dungeon_tilesets
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile dungeon parameters data
|
# Compile dungeon parameters data
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_dungeon_parameters(*paths)
|
def compile_dungeon_parameters(*paths)
|
||||||
compile_PBS_file_generic(GameData::DungeonParameters, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::DungeonParameters, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_dungeon_parameters : validate_compiled_dungeon_parameters(hash)
|
(final_validate) ? validate_all_compiled_dungeon_parameters : validate_compiled_dungeon_parameters(hash)
|
||||||
@@ -1237,9 +1370,9 @@ module Compiler
|
|||||||
def validate_all_compiled_dungeon_parameters
|
def validate_all_compiled_dungeon_parameters
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Compile phone messages
|
# Compile phone messages
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def compile_phone(*paths)
|
def compile_phone(*paths)
|
||||||
compile_PBS_file_generic(GameData::PhoneMessage, *paths) do |final_validate, hash|
|
compile_PBS_file_generic(GameData::PhoneMessage, *paths) do |final_validate, hash|
|
||||||
(final_validate) ? validate_all_compiled_phone_contacts : validate_compiled_phone_contact(hash)
|
(final_validate) ? validate_all_compiled_phone_contacts : validate_compiled_phone_contact(hash)
|
||||||
@@ -1273,55 +1406,4 @@ module Compiler
|
|||||||
end
|
end
|
||||||
MessageTypes.setMessagesAsHash(MessageTypes::PHONE_MESSAGES, messages)
|
MessageTypes.setMessagesAsHash(MessageTypes::PHONE_MESSAGES, messages)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
# Compile battle animations
|
|
||||||
#=============================================================================
|
|
||||||
def compile_animations
|
|
||||||
Console.echo_li(_INTL("Compiling animations..."))
|
|
||||||
begin
|
|
||||||
pbanims = load_data("Data/PkmnAnimations.rxdata")
|
|
||||||
rescue
|
|
||||||
pbanims = PBAnimations.new
|
|
||||||
end
|
|
||||||
changed = false
|
|
||||||
move2anim = [{}, {}]
|
|
||||||
# anims = load_data("Data/Animations.rxdata")
|
|
||||||
# for anim in anims
|
|
||||||
# next if !anim || anim.frames.length == 1
|
|
||||||
# found = false
|
|
||||||
# for i in 0...pbanims.length
|
|
||||||
# if pbanims[i] && pbanims[i].id == anim.id
|
|
||||||
# found = true if pbanims[i].array.length > 1
|
|
||||||
# break
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# pbanims[anim.id] = pbConvertRPGAnimation(anim) if !found
|
|
||||||
# end
|
|
||||||
idx = 0
|
|
||||||
pbanims.length.times do |i|
|
|
||||||
echo "." if idx % 100 == 0
|
|
||||||
Graphics.update if idx % 500 == 0
|
|
||||||
idx += 1
|
|
||||||
next if !pbanims[i]
|
|
||||||
if pbanims[i].name[/^OppMove\:\s*(.*)$/]
|
|
||||||
if GameData::Move.exists?($~[1])
|
|
||||||
moveid = GameData::Move.get($~[1]).id
|
|
||||||
changed = true if !move2anim[0][moveid] || move2anim[1][moveid] != i
|
|
||||||
move2anim[1][moveid] = i
|
|
||||||
end
|
|
||||||
elsif pbanims[i].name[/^Move\:\s*(.*)$/]
|
|
||||||
if GameData::Move.exists?($~[1])
|
|
||||||
moveid = GameData::Move.get($~[1]).id
|
|
||||||
changed = true if !move2anim[0][moveid] || move2anim[0][moveid] != i
|
|
||||||
move2anim[0][moveid] = i
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if changed
|
|
||||||
save_data(move2anim, "Data/move2anim.dat")
|
|
||||||
save_data(pbanims, "Data/PkmnAnimations.rxdata")
|
|
||||||
end
|
|
||||||
process_pbs_file_message_end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,42 @@
|
|||||||
module Compiler
|
module Compiler
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
|
def write_all_pbs_files
|
||||||
|
Console.echo_h1(_INTL("Writing all PBS files"))
|
||||||
|
write_town_map
|
||||||
|
write_connections
|
||||||
|
write_types
|
||||||
|
write_abilities
|
||||||
|
write_moves
|
||||||
|
write_items
|
||||||
|
write_berry_plants
|
||||||
|
write_pokemon
|
||||||
|
write_pokemon_forms
|
||||||
|
write_pokemon_metrics
|
||||||
|
write_shadow_pokemon
|
||||||
|
write_regional_dexes
|
||||||
|
write_ribbons
|
||||||
|
write_encounters
|
||||||
|
write_trainer_types
|
||||||
|
write_trainers
|
||||||
|
write_trainer_lists
|
||||||
|
write_metadata
|
||||||
|
write_map_metadata
|
||||||
|
write_dungeon_tilesets
|
||||||
|
write_dungeon_parameters
|
||||||
|
write_phone
|
||||||
|
echoln ""
|
||||||
|
Console.echo_h2(_INTL("Successfully rewrote all PBS files"), text: :green)
|
||||||
|
end
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Generic methods used when writing PBS files
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
def write_pbs_file_message_start(filename)
|
||||||
|
# The `` around the file's name turns it cyan
|
||||||
|
Console.echo_li(_INTL("Writing PBS file `{1}`...", filename.split("/").last))
|
||||||
|
end
|
||||||
|
|
||||||
def get_all_PBS_file_paths(game_data)
|
def get_all_PBS_file_paths(game_data)
|
||||||
ret = []
|
ret = []
|
||||||
game_data.each { |element| ret.push(element.pbs_file_suffix) if !ret.include?(element.pbs_file_suffix) }
|
game_data.each { |element| ret.push(element.pbs_file_suffix) if !ret.include?(element.pbs_file_suffix) }
|
||||||
@@ -64,16 +100,16 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Town Map data to PBS file
|
# Save Town Map data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_town_map
|
def write_town_map
|
||||||
write_PBS_file_generic(GameData::TownMap)
|
write_PBS_file_generic(GameData::TownMap)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save map connections to PBS file
|
# Save map connections to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def normalize_connection(conn)
|
def normalize_connection(conn)
|
||||||
ret = conn.clone
|
ret = conn.clone
|
||||||
if conn[1].negative? != conn[4].negative? # Exactly one is negative
|
if conn[1].negative? != conn[4].negative? # Exactly one is negative
|
||||||
@@ -131,46 +167,46 @@ module Compiler
|
|||||||
process_pbs_file_message_end
|
process_pbs_file_message_end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save type data to PBS file
|
# Save type data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_types
|
def write_types
|
||||||
write_PBS_file_generic(GameData::Type)
|
write_PBS_file_generic(GameData::Type)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save ability data to PBS file
|
# Save ability data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_abilities
|
def write_abilities
|
||||||
write_PBS_file_generic(GameData::Ability)
|
write_PBS_file_generic(GameData::Ability)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save move data to PBS file
|
# Save move data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_moves
|
def write_moves
|
||||||
write_PBS_file_generic(GameData::Move)
|
write_PBS_file_generic(GameData::Move)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save item data to PBS file
|
# Save item data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_items
|
def write_items
|
||||||
write_PBS_file_generic(GameData::Item)
|
write_PBS_file_generic(GameData::Item)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save berry plant data to PBS file
|
# Save berry plant data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_berry_plants
|
def write_berry_plants
|
||||||
write_PBS_file_generic(GameData::BerryPlant)
|
write_PBS_file_generic(GameData::BerryPlant)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Pokémon data to PBS file
|
# Save Pokémon data to PBS file
|
||||||
# NOTE: Doesn't use write_PBS_file_generic because it needs to ignore defined
|
# NOTE: Doesn't use write_PBS_file_generic because it needs to ignore defined
|
||||||
# species with a form that isn't 0.
|
# species with a form that isn't 0.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_pokemon
|
def write_pokemon
|
||||||
paths = []
|
paths = []
|
||||||
GameData::Species.each_species { |element| paths.push(element.pbs_file_suffix) if !paths.include?(element.pbs_file_suffix) }
|
GameData::Species.each_species { |element| paths.push(element.pbs_file_suffix) if !paths.include?(element.pbs_file_suffix) }
|
||||||
@@ -222,11 +258,11 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Pokémon forms data to PBS file
|
# Save Pokémon forms data to PBS file
|
||||||
# NOTE: Doesn't use write_PBS_file_generic because it needs to ignore defined
|
# NOTE: Doesn't use write_PBS_file_generic because it needs to ignore defined
|
||||||
# species with a form of 0, and needs its own schema.
|
# species with a form of 0, and needs its own schema.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_pokemon_forms
|
def write_pokemon_forms
|
||||||
paths = []
|
paths = []
|
||||||
GameData::Species.each do |element|
|
GameData::Species.each do |element|
|
||||||
@@ -282,12 +318,12 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Write species metrics
|
# Write species metrics
|
||||||
# NOTE: Doesn't use write_PBS_file_generic because it needs to ignore defined
|
# NOTE: Doesn't use write_PBS_file_generic because it needs to ignore defined
|
||||||
# metrics for forms of species where the metrics are the same as for the
|
# metrics for forms of species where the metrics are the same as for the
|
||||||
# base species.
|
# base species.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_pokemon_metrics
|
def write_pokemon_metrics
|
||||||
paths = []
|
paths = []
|
||||||
GameData::SpeciesMetrics.each do |element|
|
GameData::SpeciesMetrics.each do |element|
|
||||||
@@ -350,17 +386,17 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Shadow Pokémon data to PBS file
|
# Save Shadow Pokémon data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_shadow_pokemon
|
def write_shadow_pokemon
|
||||||
return if GameData::ShadowPokemon::DATA.empty?
|
return if GameData::ShadowPokemon::DATA.empty?
|
||||||
write_PBS_file_generic(GameData::ShadowPokemon)
|
write_PBS_file_generic(GameData::ShadowPokemon)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Regional Dexes to PBS file
|
# Save Regional Dexes to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_regional_dexes(path = "PBS/regional_dexes.txt")
|
def write_regional_dexes(path = "PBS/regional_dexes.txt")
|
||||||
write_pbs_file_message_start(path)
|
write_pbs_file_message_start(path)
|
||||||
dex_lists = pbLoadRegionalDexes
|
dex_lists = pbLoadRegionalDexes
|
||||||
@@ -390,16 +426,16 @@ module Compiler
|
|||||||
process_pbs_file_message_end
|
process_pbs_file_message_end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save ability data to PBS file
|
# Save ability data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_ribbons
|
def write_ribbons
|
||||||
write_PBS_file_generic(GameData::Ribbon)
|
write_PBS_file_generic(GameData::Ribbon)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save wild encounter data to PBS file
|
# Save wild encounter data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_encounters
|
def write_encounters
|
||||||
paths = get_all_PBS_file_paths(GameData::Encounter)
|
paths = get_all_PBS_file_paths(GameData::Encounter)
|
||||||
map_infos = pbLoadMapInfos
|
map_infos = pbLoadMapInfos
|
||||||
@@ -441,16 +477,16 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save trainer type data to PBS file
|
# Save trainer type data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_trainer_types
|
def write_trainer_types
|
||||||
write_PBS_file_generic(GameData::TrainerType)
|
write_PBS_file_generic(GameData::TrainerType)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save individual trainer data to PBS file
|
# Save individual trainer data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_trainers
|
def write_trainers
|
||||||
paths = get_all_PBS_file_paths(GameData::Trainer)
|
paths = get_all_PBS_file_paths(GameData::Trainer)
|
||||||
schema = GameData::Trainer.schema
|
schema = GameData::Trainer.schema
|
||||||
@@ -505,9 +541,9 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save trainer list data to PBS file
|
# Save trainer list data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_trainer_lists(path = "PBS/battle_facility_lists.txt")
|
def write_trainer_lists(path = "PBS/battle_facility_lists.txt")
|
||||||
trainerlists = load_data("Data/trainer_lists.dat") rescue nil
|
trainerlists = load_data("Data/trainer_lists.dat") rescue nil
|
||||||
return if !trainerlists
|
return if !trainerlists
|
||||||
@@ -528,9 +564,9 @@ module Compiler
|
|||||||
process_pbs_file_message_end
|
process_pbs_file_message_end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Battle Tower trainer data to PBS file
|
# Save Battle Tower trainer data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_battle_tower_trainers(bttrainers, filename)
|
def write_battle_tower_trainers(bttrainers, filename)
|
||||||
return if !bttrainers || !filename
|
return if !bttrainers || !filename
|
||||||
btTrainersRequiredTypes = {
|
btTrainersRequiredTypes = {
|
||||||
@@ -567,9 +603,9 @@ module Compiler
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save Battle Tower Pokémon data to PBS file
|
# Save Battle Tower Pokémon data to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_battle_tower_pokemon(btpokemon, filename)
|
def write_battle_tower_pokemon(btpokemon, filename)
|
||||||
return if !btpokemon || !filename
|
return if !btpokemon || !filename
|
||||||
species = {}
|
species = {}
|
||||||
@@ -618,11 +654,11 @@ module Compiler
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save metadata data to PBS file
|
# Save metadata data to PBS file
|
||||||
# NOTE: Doesn't use write_PBS_file_generic because it contains data for two
|
# NOTE: Doesn't use write_PBS_file_generic because it contains data for two
|
||||||
# different GameData classes.
|
# different GameData classes.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_metadata
|
def write_metadata
|
||||||
paths = []
|
paths = []
|
||||||
GameData::Metadata.each do |element|
|
GameData::Metadata.each do |element|
|
||||||
@@ -680,11 +716,11 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save map metadata data to PBS file
|
# Save map metadata data to PBS file
|
||||||
# NOTE: Doesn't use write_PBS_file_generic because it writes the RMXP map name
|
# NOTE: Doesn't use write_PBS_file_generic because it writes the RMXP map name
|
||||||
# next to the section header for each map.
|
# next to the section header for each map.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_map_metadata
|
def write_map_metadata
|
||||||
paths = get_all_PBS_file_paths(GameData::MapMetadata)
|
paths = get_all_PBS_file_paths(GameData::MapMetadata)
|
||||||
map_infos = pbLoadMapInfos
|
map_infos = pbLoadMapInfos
|
||||||
@@ -726,11 +762,11 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save dungeon tileset contents data to PBS file
|
# Save dungeon tileset contents data to PBS file
|
||||||
# NOTE: Doesn't use write_PBS_file_generic because it writes the tileset name
|
# NOTE: Doesn't use write_PBS_file_generic because it writes the tileset name
|
||||||
# next to the section header for each tileset.
|
# next to the section header for each tileset.
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_dungeon_tilesets
|
def write_dungeon_tilesets
|
||||||
paths = get_all_PBS_file_paths(GameData::DungeonTileset)
|
paths = get_all_PBS_file_paths(GameData::DungeonTileset)
|
||||||
schema = GameData::DungeonTileset.schema
|
schema = GameData::DungeonTileset.schema
|
||||||
@@ -774,48 +810,17 @@ module Compiler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save dungeon parameters to PBS file
|
# Save dungeon parameters to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_dungeon_parameters
|
def write_dungeon_parameters
|
||||||
write_PBS_file_generic(GameData::DungeonParameters)
|
write_PBS_file_generic(GameData::DungeonParameters)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
# Save phone messages to PBS file
|
# Save phone messages to PBS file
|
||||||
#=============================================================================
|
#-----------------------------------------------------------------------------
|
||||||
def write_phone
|
def write_phone
|
||||||
write_PBS_file_generic(GameData::PhoneMessage)
|
write_PBS_file_generic(GameData::PhoneMessage)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
# Save all data to PBS files
|
|
||||||
#=============================================================================
|
|
||||||
def write_all
|
|
||||||
Console.echo_h1(_INTL("Writing all PBS files"))
|
|
||||||
write_town_map
|
|
||||||
write_connections
|
|
||||||
write_types
|
|
||||||
write_abilities
|
|
||||||
write_moves
|
|
||||||
write_items
|
|
||||||
write_berry_plants
|
|
||||||
write_pokemon
|
|
||||||
write_pokemon_forms
|
|
||||||
write_pokemon_metrics
|
|
||||||
write_shadow_pokemon
|
|
||||||
write_regional_dexes
|
|
||||||
write_ribbons
|
|
||||||
write_encounters
|
|
||||||
write_trainer_types
|
|
||||||
write_trainers
|
|
||||||
write_trainer_lists
|
|
||||||
write_metadata
|
|
||||||
write_map_metadata
|
|
||||||
write_dungeon_tilesets
|
|
||||||
write_dungeon_parameters
|
|
||||||
write_phone
|
|
||||||
echoln ""
|
|
||||||
Console.echo_h2(_INTL("Successfully rewrote all PBS files"), text: :green)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
61
Data/Scripts/021_Compiler/004_Compiler_Animations.rb
Normal file
61
Data/Scripts/021_Compiler/004_Compiler_Animations.rb
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
module Compiler
|
||||||
|
@@categories[:animations] = {
|
||||||
|
:should_compile => proc { next false },
|
||||||
|
:header_text => proc { next _INTL("Compiling animations") },
|
||||||
|
:skipped_text => proc { next _INTL("Not compiled") },
|
||||||
|
:compile => proc { compile_animations }
|
||||||
|
}
|
||||||
|
|
||||||
|
module_function
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Compile battle animations
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
def compile_animations
|
||||||
|
Console.echo_li(_INTL("Compiling animations..."))
|
||||||
|
begin
|
||||||
|
pbanims = load_data("Data/PkmnAnimations.rxdata")
|
||||||
|
rescue
|
||||||
|
pbanims = PBAnimations.new
|
||||||
|
end
|
||||||
|
changed = false
|
||||||
|
move2anim = [{}, {}]
|
||||||
|
# anims = load_data("Data/Animations.rxdata")
|
||||||
|
# for anim in anims
|
||||||
|
# next if !anim || anim.frames.length == 1
|
||||||
|
# found = false
|
||||||
|
# for i in 0...pbanims.length
|
||||||
|
# if pbanims[i] && pbanims[i].id == anim.id
|
||||||
|
# found = true if pbanims[i].array.length > 1
|
||||||
|
# break
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# pbanims[anim.id] = pbConvertRPGAnimation(anim) if !found
|
||||||
|
# end
|
||||||
|
idx = 0
|
||||||
|
pbanims.length.times do |i|
|
||||||
|
echo "." if idx % 100 == 0
|
||||||
|
Graphics.update if idx % 500 == 0
|
||||||
|
idx += 1
|
||||||
|
next if !pbanims[i]
|
||||||
|
if pbanims[i].name[/^OppMove\:\s*(.*)$/]
|
||||||
|
if GameData::Move.exists?($~[1])
|
||||||
|
moveid = GameData::Move.get($~[1]).id
|
||||||
|
changed = true if !move2anim[0][moveid] || move2anim[1][moveid] != i
|
||||||
|
move2anim[1][moveid] = i
|
||||||
|
end
|
||||||
|
elsif pbanims[i].name[/^Move\:\s*(.*)$/]
|
||||||
|
if GameData::Move.exists?($~[1])
|
||||||
|
moveid = GameData::Move.get($~[1]).id
|
||||||
|
changed = true if !move2anim[0][moveid] || move2anim[0][moveid] != i
|
||||||
|
move2anim[0][moveid] = i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if changed
|
||||||
|
save_data(move2anim, "Data/move2anim.dat")
|
||||||
|
save_data(pbanims, "Data/PkmnAnimations.rxdata")
|
||||||
|
end
|
||||||
|
process_pbs_file_message_end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -37,6 +37,28 @@ module Compiler
|
|||||||
["calcStats", "calc_stats"]
|
["calcStats", "calc_stats"]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@categories[:map_data] = {
|
||||||
|
:should_compile => proc { next import_new_maps },
|
||||||
|
:header_text => proc { next _INTL("Modifying map data") },
|
||||||
|
:skipped_text => proc { next _INTL("Not modified") },
|
||||||
|
:compile => proc { compile_trainer_events }
|
||||||
|
}
|
||||||
|
|
||||||
|
@@categories[:messages] = {
|
||||||
|
:should_compile => proc { next false },
|
||||||
|
:header_text => proc { next _INTL("Gathering messages for translations") },
|
||||||
|
:skipped_text => proc { next _INTL("Not gathered") },
|
||||||
|
:compile => proc {
|
||||||
|
Console.echo_li(_INTL("Finding messages..."))
|
||||||
|
Translator.gather_script_and_event_texts
|
||||||
|
Console.echo_done(true)
|
||||||
|
Console.echo_li(_INTL("Saving messages..."))
|
||||||
|
MessageTypes.save_default_messages
|
||||||
|
MessageTypes.load_default_messages if FileTest.exist?("Data/messages_core.dat")
|
||||||
|
Console.echo_done(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -1680,7 +1702,7 @@ module Compiler
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Main compiler method for events
|
# Main compiler method for events
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def compile_trainer_events(_mustcompile)
|
def compile_trainer_events
|
||||||
mapData = MapData.new
|
mapData = MapData.new
|
||||||
t = System.uptime
|
t = System.uptime
|
||||||
Graphics.update
|
Graphics.update
|
||||||
Reference in New Issue
Block a user