Tidying up

This commit is contained in:
Maruno17
2021-06-19 20:36:17 +01:00
parent e472d0fcdf
commit 9b4bc66dc0
5 changed files with 20 additions and 20 deletions

View File

@@ -128,27 +128,27 @@ module Compiler
yield lastsection,sectionname if havesection
end
# Used for pokemon.txt, metadata.txt
# Used for types.txt, pokemon.txt, trainerlists.txt and Battle Tower trainers PBS files
def pbEachFileSection(f)
pbEachFileSectionEx(f) { |section,name|
yield section,name if block_given? && name[/^.+$/]
}
end
# Used for metadata.txt
def pbEachFileSectionNumbered(f)
pbEachFileSectionEx(f) { |section,name|
yield section,name.to_i if block_given? && name[/^\d+$/]
}
end
# Used for pokemonforms.txt
def pbEachFileSection2(f)
def pbEachFileSectionPokemonForms(f)
pbEachFileSectionEx(f) { |section,name|
yield section,name if block_given? && name[/^\w+[-,\s]{1}\d+$/]
}
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