fix(renpy): ignore music statements when the work has no audio

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-19 05:01:59 +02:00
1 parent ce7888e4bc
commit 0af910a697
1 file changed
+2 -2
+2 -2
View File
@@ -461,8 +461,8 @@ class SceneWriter:
def music(self, spec: str | None) -> None:
"""Play/stop for a mood, ``track:<path>`` or ``none``; never restarts what already plays."""
if spec is None:
return
if spec is None or (not self.audio.files and spec != "none"):
return # nothing to play (a work without audio)
if spec == "none":
if self.music_state["playing"] is not None:
self.emit("stop music fadeout 1.0")