From fdd46f3c700d2136c4b3349b2afbfe019b0893cb Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 19 Sep 2023 18:56:15 -0400 Subject: [PATCH] Fix #379. The `_sound_name` field does not include the channel suffix (eg `:L` and `:R`), so this would explode when attempting to control a stereo sound that has been split into mono channels. --- korman/properties/modifiers/sound.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/korman/properties/modifiers/sound.py b/korman/properties/modifiers/sound.py index b626d7a..f3e4a01 100644 --- a/korman/properties/modifiers/sound.py +++ b/korman/properties/modifiers/sound.py @@ -688,7 +688,7 @@ class PlasmaSoundEmitter(PlasmaModifierProperties): def get_sound_keys(self, exporter, name=None, sound=None) -> Iterator[Tuple[plKey, int]]: assert name or sound if sound is None: - sound = next((i for i in self.sounds if i._sound_name == name), None) + sound = next((i for i in self.sounds if i.name == name), None) if sound is None: raise ValueError(name)