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

Commit

Permalink
Another fix for map merging
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceneNerd committed Oct 29, 2019
1 parent d33eb65 commit a156b41
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bcml/data/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version='2.4.6'
version='2.4.8'
5 changes: 3 additions & 2 deletions bcml/mubin.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,16 @@ def merge_map(map_pair: tuple, rstb_calc: rstb.SizeCalculator, no_del: bool = Fa
try:
new_map['Objs'][stock_hashes.index(hash_id)] = deepcopy(actor)
except ValueError:
new_map['Objs'].append(actor)
changes['add'].append(actor)
stock_links = []
if map_unit.type == 'Static' and changes['del']:
for actor in new_map['Objs']:
if 'LinksToObj' in actor:
stock_links.extend([link['DestUnitHashId']
for link in actor['LinksToObj']])
if not no_del:
for map_del in changes['del']:
for map_del in sorted(changes['del'], key=lambda change: stock_hashes.index(change) \
if change in stock_hashes else -1, reverse=True):
if map_del in stock_hashes and map_del not in stock_links:
try:
new_map['Objs'].pop(stock_hashes.index(map_del))
Expand Down
2 changes: 1 addition & 1 deletion installer.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Application]
name=BCML
version=2.4.6
version=2.4.8
entry_point=bcml.__init__:main
icon=bcml/data/bcml.ico

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='bcml',
version='2.4.6',
version='2.4.8',
author='NiceneNerd',
author_email='[email protected]',
description='A mod manager for The Legend of Zelda: Breath of the Wild on Cemu',
Expand Down

0 comments on commit a156b41

Please sign in to comment.