Skip to content

Commit

Permalink
Make narc build scripts take correct arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
wildfire248 committed Feb 10, 2024
1 parent 277621e commit b813f7f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 3 additions & 2 deletions res/pokemon/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ otherpoke_shared = files(
'.shared/shadows.png',
)

sinnoh_pokedex = files('sinnoh_pokedex.json')

# Process mons in national dex order
pokemon_subdirs = [
Expand Down Expand Up @@ -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
]
)

Expand All @@ -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
]
)

Expand Down
7 changes: 3 additions & 4 deletions tools/scripts/make_pl_pokezukan.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
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)
Expand All @@ -38,7 +37,7 @@

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
Expand Down
7 changes: 3 additions & 4 deletions tools/scripts/make_shinzukan.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
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)
Expand All @@ -38,7 +37,7 @@

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
Expand Down

0 comments on commit b813f7f

Please sign in to comment.