Skip to content

Commit

Permalink
generator: improve dupe skip for bnk with cloned wems
Browse files Browse the repository at this point in the history
  • Loading branch information
bnnm committed Feb 8, 2025
1 parent 7685156 commit b99fc48
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wwiser/generator/txtp/wtxtp_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,15 @@ def _write_sound(self, tnode):
if self._txtpcache.alt_exts:
extension = sound.source.extension_alt

if media:
if media and self._simpler:
# when finding dupes we want to ignore bank origins were same sounds are loaded in multiple .bnk
# (would be technically possible that 2 .wem in .bnk share same id but content differs, extremely unlikely though)
bankname, index = media
#name += self._txtpcache.locator.find_bnk_path(bankname, lang_fullname)
name += 'banks/' #sometimes id repeat between banks in different localization dirs
name += "%s.%s" % (sound.source.tid, extension)
#info += " ##%s #s%s" % (bankname, index + 1) #matters for dupes
elif media:
bankname, index = media
name += self._txtpcache.locator.find_bnk_path(bankname, lang_fullname)
name += "%s #s%s" % (bankname, index + 1)
Expand Down

0 comments on commit b99fc48

Please sign in to comment.