Skip to content

Commit

Permalink
Fix incorrect stero sound name lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoikas committed Sep 22, 2023
1 parent 17afd0e commit 2319bcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions korman/properties/modifiers/sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,11 @@ def get_sound_keys(self, exporter, name=None, sound=None) -> Iterator[Tuple[plKe
if sound is None:
sound = next((i for i in self.sounds if i.name == name), None)
if sound is None:
raise ValueError(name)
raise ValueError(f"{self.id_data.name}: Sound {name}")

if sound.is_3d_stereo:
yield from self.stereize_left.plasma_modifiers.soundemit.get_sound_keys(exporter, sound.name)
yield from self.stereize_right.plasma_modifiers.soundemit.get_sound_keys(exporter, sound.name)
yield from self.stereize_left.plasma_modifiers.soundemit.get_sound_keys(exporter, f"{sound.name}:L")
yield from self.stereize_right.plasma_modifiers.soundemit.get_sound_keys(exporter, f"{sound.name}:R")
else:
for i, j in enumerate(filter(lambda x: x.enabled, self.sounds)):
if sound == j:
Expand Down

0 comments on commit 2319bcf

Please sign in to comment.