From 0af910a697af32c2f07fe7e687cba4da78227cc6 Mon Sep 17 00:00:00 2001 From: Dasemu Date: Mon, 19 Oct 2026 05:01:59 +0200 Subject: [PATCH] fix(renpy): ignore music statements when the work has no audio Co-Authored-By: Claude Opus 5.5 --- src/vnpipe/renpy_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vnpipe/renpy_gen.py b/src/vnpipe/renpy_gen.py index 7d64b0f..d4fee44 100644 --- a/src/vnpipe/renpy_gen.py +++ b/src/vnpipe/renpy_gen.py @@ -461,8 +461,8 @@ class SceneWriter: def music(self, spec: str | None) -> None: """Play/stop for a mood, ``track:`` 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")