Removed all uses of ID numbers for types, Shape property in pokemon.txt must now be a name and not a number

This commit is contained in:
Maruno17
2021-06-16 20:32:30 +01:00
parent 0e8b1e70b1
commit 8c67127f06
15 changed files with 119 additions and 101 deletions

View File

@@ -128,7 +128,7 @@ module Compiler
yield lastsection,sectionname if havesection
end
# Used for types.txt, pokemon.txt, metadata.txt
# Used for pokemon.txt, metadata.txt
def pbEachFileSection(f)
pbEachFileSectionEx(f) { |section,name|
yield section,name.to_i if block_given? && name[/^\d+$/]
@@ -142,6 +142,13 @@ module Compiler
}
end
# Used for types.txt
def pbEachFileSection3(f)
pbEachFileSectionEx(f) { |section,name|
yield section,name if block_given? && name[/^.+$/]
}
end
# Used for phone.txt
def pbEachSection(f)
lineno = 1
@@ -600,6 +607,7 @@ module Compiler
# 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.
#=============================================================================
# Unused
def pbGetConst(mod,item,err)
isDef = false
begin
@@ -735,11 +743,12 @@ module Compiler
return if !$DEBUG
begin
dataFiles = [
"abilities.dat",
"berry_plants.dat",
"encounters.dat",
"form2species.dat",
"items.dat",
"map_connections.dat",
"map_metadata.dat",
"metadata.dat",
"moves.dat",
"phone.dat",
@@ -747,11 +756,6 @@ module Compiler
"ribbons.dat",
"shadow_movesets.dat",
"species.dat",
"species_eggmoves.dat",
"species_evolutions.dat",
"species_metrics.dat",
"species_movesets.dat",
"tm.dat",
"town_map.dat",
"trainer_lists.dat",
"trainer_types.dat",