mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Renamed various PBS files
This commit is contained in:
@@ -128,7 +128,7 @@ module Compiler
|
||||
yield lastsection,sectionname if havesection
|
||||
end
|
||||
|
||||
# Used for types.txt, pokemon.txt, trainerlists.txt and Battle Tower trainers PBS files
|
||||
# Used for types.txt, pokemon.txt, battle_facility_lists.txt and Battle Tower trainers PBS files
|
||||
def pbEachFileSection(f)
|
||||
pbEachFileSectionEx(f) { |section,name|
|
||||
yield section,name if block_given? && name[/^.+$/]
|
||||
@@ -142,7 +142,7 @@ module Compiler
|
||||
}
|
||||
end
|
||||
|
||||
# Used for pokemonforms.txt
|
||||
# Used for pokemon_forms.txt
|
||||
def pbEachFileSectionPokemonForms(f)
|
||||
pbEachFileSectionEx(f) { |section,name|
|
||||
yield section,name if block_given? && name[/^\w+[-,\s]{1}\d+$/]
|
||||
@@ -221,7 +221,7 @@ module Compiler
|
||||
}
|
||||
end
|
||||
|
||||
# Used for connections.txt, abilities.txt, moves.txt, regionaldexes.txt
|
||||
# Used for map_connections.txt, abilities.txt, moves.txt, regional_dexes.txt
|
||||
def pbCompilerEachPreppedLine(filename)
|
||||
File.open(filename,"rb") { |f|
|
||||
FileLineData.file = filename
|
||||
@@ -675,7 +675,7 @@ module Compiler
|
||||
clontype.sub!(/\s*$/, "")
|
||||
typ = GameData::TrainerType.try_get(clontype)
|
||||
if !typ
|
||||
raise _INTL("Undefined Trainer type constant name: {1}\r\nMake sure the trainer type is defined in PBS/trainertypes.txt.\r\n{2}", type, FileLineData.linereport)
|
||||
raise _INTL("Undefined Trainer type constant name: {1}\r\nMake sure the trainer type is defined in PBS/trainer_types.txt.\r\n{2}", type, FileLineData.linereport)
|
||||
end
|
||||
return typ.id
|
||||
end
|
||||
@@ -764,22 +764,22 @@ module Compiler
|
||||
]
|
||||
textFiles = [
|
||||
"abilities.txt",
|
||||
"berryplants.txt",
|
||||
"connections.txt",
|
||||
"battle_facility_lists.txt",
|
||||
"berry_plants.txt",
|
||||
"encounters.txt",
|
||||
"items.txt",
|
||||
"map_connections.txt",
|
||||
"metadata.txt",
|
||||
"moves.txt",
|
||||
"phone.txt",
|
||||
"pokemon.txt",
|
||||
"pokemonforms.txt",
|
||||
"regionaldexes.txt",
|
||||
"pokemon_forms.txt",
|
||||
"regional_dexes.txt",
|
||||
"ribbons.txt",
|
||||
"shadowmoves.txt",
|
||||
"townmap.txt",
|
||||
"trainerlists.txt",
|
||||
"shadow_movesets.txt",
|
||||
"town_map.txt",
|
||||
"trainer_types.txt",
|
||||
"trainers.txt",
|
||||
"trainertypes.txt",
|
||||
"types.txt"
|
||||
]
|
||||
latestDataTime = 0
|
||||
|
||||
@@ -4,7 +4,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile Town Map data
|
||||
#=============================================================================
|
||||
def compile_town_map(path = "PBS/townmap.txt")
|
||||
def compile_town_map(path = "PBS/town_map.txt")
|
||||
nonglobaltypes = {
|
||||
"Name" => [0, "s"],
|
||||
"Filename" => [1, "s"],
|
||||
@@ -52,7 +52,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile map connections
|
||||
#=============================================================================
|
||||
def compile_connections(path = "PBS/connections.txt")
|
||||
def compile_connections(path = "PBS/map_connections.txt")
|
||||
records = []
|
||||
pbCompilerEachPreppedLine(path) { |line,lineno|
|
||||
hashenum = {
|
||||
@@ -479,7 +479,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile berry plant data
|
||||
#=============================================================================
|
||||
def compile_berry_plants(path = "PBS/berryplants.txt")
|
||||
def compile_berry_plants(path = "PBS/berry_plants.txt")
|
||||
GameData::BerryPlant::DATA.clear
|
||||
pbCompilerEachCommentedLine(path) { |line, line_no|
|
||||
if line[/^\s*(\w+)\s*=\s*(.*)$/] # Of the format XXX = YYY
|
||||
@@ -665,7 +665,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile Pokémon forms data
|
||||
#=============================================================================
|
||||
def compile_pokemon_forms(path = "PBS/pokemonforms.txt")
|
||||
def compile_pokemon_forms(path = "PBS/pokemon_forms.txt")
|
||||
species_names = []
|
||||
species_form_names = []
|
||||
species_categories = []
|
||||
@@ -855,7 +855,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile Shadow movesets
|
||||
#=============================================================================
|
||||
def compile_shadow_movesets(path = "PBS/shadowmoves.txt")
|
||||
def compile_shadow_movesets(path = "PBS/shadow_movesets.txt")
|
||||
sections = {}
|
||||
if safeExists?(path)
|
||||
pbCompilerEachCommentedLine(path) { |line, _line_no|
|
||||
@@ -880,7 +880,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile Regional Dexes
|
||||
#=============================================================================
|
||||
def compile_regional_dexes(path = "PBS/regionaldexes.txt")
|
||||
def compile_regional_dexes(path = "PBS/regional_dexes.txt")
|
||||
dex_lists = []
|
||||
section = nil
|
||||
pbCompilerEachPreppedLine(path) { |line, line_no|
|
||||
@@ -1094,12 +1094,12 @@ module Compiler
|
||||
#=============================================================================
|
||||
# Compile trainer type data
|
||||
#=============================================================================
|
||||
def compile_trainer_types(path = "PBS/trainertypes.txt")
|
||||
def compile_trainer_types(path = "PBS/trainer_types.txt")
|
||||
GameData::TrainerType::DATA.clear
|
||||
schema = GameData::TrainerType::SCHEMA
|
||||
tr_type_names = []
|
||||
tr_type_hash = nil
|
||||
# Read each line of trainertypes.txt at a time and compile it into a trainer type
|
||||
# Read each line of trainer_types.txt at a time and compile it into a trainer type
|
||||
pbCompilerEachPreppedLine(path) { |line, line_no|
|
||||
if line[/^\s*\[\s*(.+)\s*\]\s*$/] # New section [tr_type_id]
|
||||
# Add previous trainer type's data to records
|
||||
|
||||
@@ -14,7 +14,7 @@ module Compiler
|
||||
def write_town_map
|
||||
mapdata = pbLoadTownMapData
|
||||
return if !mapdata
|
||||
File.open("PBS/townmap.txt","wb") { |f|
|
||||
File.open("PBS/town_map.txt","wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
for i in 0...mapdata.length
|
||||
map = mapdata[i]
|
||||
@@ -72,7 +72,7 @@ module Compiler
|
||||
conndata = load_data("Data/map_connections.dat")
|
||||
return if !conndata
|
||||
mapinfos = pbLoadMapInfos
|
||||
File.open("PBS/connections.txt","wb") { |f|
|
||||
File.open("PBS/map_connections.txt","wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
f.write("\#-------------------------------\r\n")
|
||||
for conn in conndata
|
||||
@@ -226,7 +226,7 @@ module Compiler
|
||||
# Save berry plant data to PBS file
|
||||
#=============================================================================
|
||||
def write_berry_plants
|
||||
File.open("PBS/berryplants.txt", "wb") { |f|
|
||||
File.open("PBS/berry_plants.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
f.write("\#-------------------------------\r\n")
|
||||
GameData::BerryPlant.each do |bp|
|
||||
@@ -341,7 +341,7 @@ module Compiler
|
||||
# Save Pokémon forms data to PBS file
|
||||
#=============================================================================
|
||||
def write_pokemon_forms
|
||||
File.open("PBS/pokemonforms.txt", "wb") { |f|
|
||||
File.open("PBS/pokemon_forms.txt", "wb") { |f|
|
||||
idx = 0
|
||||
add_PBS_header_to_file(f)
|
||||
GameData::Species.each do |species|
|
||||
@@ -448,7 +448,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
def write_shadow_movesets
|
||||
shadow_movesets = pbLoadShadowMovesets
|
||||
File.open("PBS/shadowmoves.txt", "wb") { |f|
|
||||
File.open("PBS/shadow_movesets.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
f.write("\#-------------------------------\r\n")
|
||||
GameData::Species.each do |species_data|
|
||||
@@ -465,7 +465,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
def write_regional_dexes
|
||||
dex_lists = pbLoadRegionalDexes
|
||||
File.open("PBS/regionaldexes.txt", "wb") { |f|
|
||||
File.open("PBS/regional_dexes.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
# Write each Dex list in turn
|
||||
dex_lists.each_with_index do |list, index|
|
||||
@@ -548,7 +548,7 @@ module Compiler
|
||||
# Save trainer type data to PBS file
|
||||
#=============================================================================
|
||||
def write_trainer_types
|
||||
File.open("PBS/trainertypes.txt", "wb") { |f|
|
||||
File.open("PBS/trainer_types.txt", "wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
GameData::TrainerType.each do |t|
|
||||
f.write("\#-------------------------------\r\n")
|
||||
@@ -624,7 +624,7 @@ module Compiler
|
||||
def write_trainer_lists
|
||||
trainerlists = load_data("Data/trainer_lists.dat") rescue nil
|
||||
return if !trainerlists
|
||||
File.open("PBS/trainerlists.txt","wb") { |f|
|
||||
File.open("PBS/battle_facility_lists.txt","wb") { |f|
|
||||
add_PBS_header_to_file(f)
|
||||
for tr in trainerlists
|
||||
f.write("\#-------------------------------\r\n")
|
||||
|
||||
Reference in New Issue
Block a user