From 8ea35e72ee445dc11b6aec0a9d1db3b3157cc57d Mon Sep 17 00:00:00 2001 From: Loup <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Sat, 5 Nov 2022 03:44:32 +0530 Subject: [PATCH] Fixed "Restart level" sending when not playing --- plugins/utilities/mood_light.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/utilities/mood_light.py b/plugins/utilities/mood_light.py index dabd85e..91eb528 100644 --- a/plugins/utilities/mood_light.py +++ b/plugins/utilities/mood_light.py @@ -17,12 +17,12 @@ type ml in chat or use plugin manager to open settings""" def Print(*args): - out = " ".join(args) + out = " ".join(str(args)) ba.screenmessage(out) def cprint(*args): - out = "\n".join(args) + out = "\n".join(str(args)) _ba.chatmessage(out) @@ -237,7 +237,9 @@ class SettingWindow(ba.Window): loop = True label = "DISABLE" color = (1, 0, 0) - Print("Restart level to enable") + in_game = not isinstance(_ba.get_foreground_host_session(), mainmenu.MainMenuSession) + if in_game: + Print("Restart level to apply") ba.app.config["moodlightEnabled"] = loop ba.app.config.commit() ba.buttonwidget(edit=self.enable_button, label=label, color=color)