Make narc build scripts take correct arguments

This commit is contained in:
wildfire
2024-02-10 15:07:15 +00:00
parent 277621e201
commit b813f7fcff
3 changed files with 9 additions and 10 deletions

View File

@@ -24,6 +24,7 @@ otherpoke_shared = files(
'.shared/shadows.png',
)
sinnoh_pokedex = files('sinnoh_pokedex.json')
# Process mons in national dex order
pokemon_subdirs = [
@@ -735,7 +736,7 @@ pl_pokezukan_narc = custom_target('pl_pokezukan.narc',
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
pokemon_subdirs
sinnoh_pokedex
]
)
@@ -749,7 +750,7 @@ shinzukan_narc = custom_target('shinzukan.narc',
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
pokemon_subdirs
sinnoh_pokedex
]
)

View File

@@ -23,9 +23,8 @@ argparser.add_argument('-p', '--private-dir',
argparser.add_argument('-o', '--output-dir',
required=True,
help='Path to the output directory (where the NARC will be made)')
argparser.add_argument('subdirs',
nargs='+',
help='List of subdirectories to process in-order')
argparser.add_argument('pokedex',
help='List of pokemon in the Sinnoh Pokedex')
args = argparser.parse_args()
source_dir = pathlib.Path(args.source_dir)
@@ -38,7 +37,7 @@ NUM_POKEMON = 494
pokedex = [0 for i in range(NUM_POKEMON)]
with open(source_dir / 'sinnoh_pokedex.json') as data_file:
with open(args.pokedex) as data_file:
dex_data = json.load(data_file)
for i, mon in enumerate(dex_data):
pokedex[PokemonSpecies[mon].value] = i

View File

@@ -23,9 +23,8 @@ argparser.add_argument('-p', '--private-dir',
argparser.add_argument('-o', '--output-dir',
required=True,
help='Path to the output directory (where the NARC will be made)')
argparser.add_argument('subdirs',
nargs='+',
help='List of subdirectories to process in-order')
argparser.add_argument('pokedex',
help='List of pokemon in the Sinnoh Pokedex')
args = argparser.parse_args()
source_dir = pathlib.Path(args.source_dir)
@@ -38,7 +37,7 @@ NUM_SINNOH = 211
pokedex = [0 for i in range(NUM_SINNOH)]
with open(source_dir / 'sinnoh_pokedex.json') as data_file:
with open(args.pokedex) as data_file:
dex_data = json.load(data_file)
for i, mon in enumerate(dex_data):
pokedex[i] = PokemonSpecies[mon].value