diff --git a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py index 958fd8b..0dab9c4 100755 --- a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py +++ b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py @@ -1636,13 +1636,28 @@ class Stop(BaseCommand): result = tl.AudioManager.Stop(player, extra) - if not result or result.get("matched", 0) == 0: + if not result or result.get("active", 0) == 0: if extra: tl.SayPrivate(player, f"[STOP] No active audio matched \"{extra}\".") else: tl.SayPrivate(player, "[STOP] No active audio to stop.") + elif result.get("matched", 0) == 0: + if result.get("pending", 0) > 0: + tl.SayPrivate( + player, + "[STOP] You cannot stop audio from a higher level user." + ) + elif extra: + tl.SayPrivate(player, f"[STOP] No active audio matched \"{extra}\".") + else: + tl.SayPrivate(player, "[STOP] No audio clips matched your stop request.") elif result.get("stopped", 0) > 0: tl.SayPrivate(player, f"[STOP] Stopped {result['stopped']} audio clip(s).") + if result.get("pending", 0) > 0: + tl.SayPrivate( + player, + "[STOP] Some audio could not be stopped due to user level." + ) except Exception as e: self.Logger.error(f"Stop command failed: {e}") tl.SayPrivate(player, f"[STOP] Error: {str(e)}")