Many TRs as Move Tutors

This commit is contained in:
Skeli
2020-02-24 20:51:34 +02:00
parent 4d22be82b3
commit df5be8cb16
132 changed files with 7435 additions and 270 deletions

View File

@@ -94,7 +94,10 @@ def RunCommand(cmd: [str]):
try:
subprocess.check_output(cmd)
except subprocess.CalledProcessError as e:
print(e.output.decode(), file=sys.stderr)
try:
print(e.output.decode(), file=sys.stderr)
except:
print(e)
sys.exit(1)

View File

@@ -4,8 +4,8 @@ from glob import glob
# Data
TM_HM_COUNT = 128
TUTOR_COUNT = 64
SPECIES_COUNT = 0x44D
TUTOR_COUNT = 128
SPECIES_COUNT = 0x4EA + 1
TM_OUTPUT = "assembly/generated/tm_compatibility.s"
TUTOR_OUTPUT = "assembly/generated/tutor_compatibility.s"
@@ -68,7 +68,7 @@ def DataBuilder(directory: str, numEntries: int, outputFile: str, dataType: str)
lineContents = int(ReverseSpeciesDict["SPECIES_" + line.strip()])
compatibilityTable[lineContents][tmId] = 1
except KeyError:
print('Error with key: {} on line {} in: {}'.format(line.strip(), i, filePath))
print('Error with key: {} on line {} in: {}'.format(line.strip(), i + 1, filePath))
output.write(".thumb\n.align 2\n\n@THIS IS A GENERATED FILE! DO NOT MODIFY IT!\n\n"
".global g{}Learnsets\ng{}Learnsets:\n".format(dataType, dataType))
@@ -108,7 +108,7 @@ def ReverseString(string: str) -> str:
def PokemonDataListInitializer(numEntries: int) -> [[]]:
outerList = []
for a in range(int(SPECIES_COUNT) + 1):
for a in range(int(SPECIES_COUNT)):
innerList = [0] * numEntries
outerList.append(innerList)
return outerList