Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Another map merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceneNerd committed Sep 15, 2019
1 parent e842f62 commit 51488d8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions bcml/mubin.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@ def get_stock_map(map_unit: Union[Map, tuple], force_vanilla: bool = False) -> d
map_bytes = None
if force_vanilla:
try:
map_bytes = util.get_game_file(
f'Map/MainField/{map_unit.section}/{map_unit.section}_{map_unit.type}.smubin'
).read_bytes()
map_path = (
util.get_update_dir() / 'Map/MainField/'
f'{map_unit.section}/{map_unit.section}_{map_unit.type}.smubin'
)
if not map_path.exists():
map_path = (
util.get_game_dir() / 'Map/MainField/'
f'{map_unit.section}/{map_unit.section}_{map_unit.type}.smubin'
)
map_bytes = map_path.read_bytes()
except FileNotFoundError:
with util.get_game_file('Pack/TitleBG.pack').open('rb') \
as s_file:
Expand Down

0 comments on commit 51488d8

Please sign in to comment.