mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Renamed various PBS files
This commit is contained in:
@@ -189,14 +189,14 @@ module Settings
|
||||
# Dex list to view if more than one is available (false).
|
||||
USE_CURRENT_REGION_DEX = false
|
||||
# The names of the Pokédex lists, in the order they are defined in the PBS
|
||||
# file "regionaldexes.txt". The last name is for the National Dex and is added
|
||||
# onto the end of this array (remember that you don't need to use it). This
|
||||
# array's order is also the order of $Trainer.pokedex.unlocked_dexes, which
|
||||
# records which Dexes have been unlocked (the first is unlocked by default).
|
||||
# If an entry is just a name, then the region map shown in the Area page while
|
||||
# viewing that Dex list will be the region map of the region the player is
|
||||
# currently in. The National Dex entry should always behave like this.
|
||||
# If an entry is of the form [name, number], then the number is a region
|
||||
# file "regional_dexes.txt". The last name is for the National Dex and is
|
||||
# added onto the end of this array (remember that you don't need to use it).
|
||||
# This array's order is also the order of $Trainer.pokedex.unlocked_dexes,
|
||||
# which records which Dexes have been unlocked (the first is unlocked by
|
||||
# default). If an entry is just a name, then the region map shown in the Area
|
||||
# page while viewing that Dex list will be the region map of the region the
|
||||
# player is currently in. The National Dex entry should always behave like
|
||||
# this. If an entry is of the form [name, number], then the number is a region
|
||||
# number. That region's map will appear in the Area page while viewing that
|
||||
# Dex list, no matter which region the player is currently in.
|
||||
def self.pokedex_names
|
||||
|
||||
@@ -170,7 +170,7 @@ class PokemonRegionMap_Scene
|
||||
|
||||
# TODO: Why is this PBS file writer here?
|
||||
def pbSaveMapData
|
||||
File.open("PBS/townmap.txt","wb") { |f|
|
||||
File.open("PBS/town_map.txt","wb") { |f|
|
||||
Compiler.add_PBS_header_to_file(f)
|
||||
for i in 0...@mapdata.length
|
||||
map = @mapdata[i]
|
||||
|
||||
@@ -1097,22 +1097,22 @@ DebugMenuCommands.register("createpbs", {
|
||||
cmds = [
|
||||
_INTL("[Create all]"),
|
||||
"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"
|
||||
]
|
||||
loop do
|
||||
@@ -1120,22 +1120,22 @@ DebugMenuCommands.register("createpbs", {
|
||||
case cmd
|
||||
when 0 then Compiler.write_all
|
||||
when 1 then Compiler.write_abilities
|
||||
when 2 then Compiler.write_berry_plants
|
||||
when 3 then Compiler.write_connections
|
||||
when 2 then Compiler.write_trainer_lists
|
||||
when 3 then Compiler.write_berry_plants
|
||||
when 4 then Compiler.write_encounters
|
||||
when 5 then Compiler.write_items
|
||||
when 6 then Compiler.write_metadata
|
||||
when 7 then Compiler.write_moves
|
||||
when 8 then Compiler.write_phone
|
||||
when 9 then Compiler.write_pokemon
|
||||
when 10 then Compiler.write_pokemon_forms
|
||||
when 11 then Compiler.write_regional_dexes
|
||||
when 12 then Compiler.write_ribbons
|
||||
when 13 then Compiler.write_shadow_movesets
|
||||
when 14 then Compiler.write_town_map
|
||||
when 15 then Compiler.write_trainer_lists
|
||||
when 16 then Compiler.write_trainers
|
||||
when 17 then Compiler.write_trainer_types
|
||||
when 6 then Compiler.write_connections
|
||||
when 7 then Compiler.write_metadata
|
||||
when 8 then Compiler.write_moves
|
||||
when 9 then Compiler.write_phone
|
||||
when 10 then Compiler.write_pokemon
|
||||
when 11 then Compiler.write_pokemon_forms
|
||||
when 12 then Compiler.write_regional_dexes
|
||||
when 13 then Compiler.write_ribbons
|
||||
when 14 then Compiler.write_shadow_movesets
|
||||
when 15 then Compiler.write_town_map
|
||||
when 16 then Compiler.write_trainer_types
|
||||
when 17 then Compiler.write_trainers
|
||||
when 18 then Compiler.write_types
|
||||
else break
|
||||
end
|
||||
|
||||
@@ -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