From e9e522acfc9b356c015d88a7ddd614697a5cfab8 Mon Sep 17 00:00:00 2001 From: Rikko Date: Fri, 12 Aug 2022 07:10:59 +0530 Subject: [PATCH] v1.2.0 - Add on_plugin_manager_prompt method --- plugins/utilities/colorscheme.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/utilities/colorscheme.py b/plugins/utilities/colorscheme.py index 41c8d4b..b339d04 100644 --- a/plugins/utilities/colorscheme.py +++ b/plugins/utilities/colorscheme.py @@ -367,7 +367,7 @@ class CustomTransactions: _ba.add_transaction = self._handle -def colorscheme_transaction(transaction, *args, **kwargs): +def launch_colorscheme_selection_window(): # We store whether the player is a pro account or not since we # temporarily attempt to bypass the limitation where only pro # accounts can set custom RGB color values, and we restore this @@ -386,6 +386,10 @@ def colorscheme_transaction(transaction, *args, **kwargs): ColorSchemeWindow() +def colorscheme_transaction(transaction, *args, **kwargs): + launch_colorscheme_selection_window() + + def load_colorscheme(): color, highlight = ba.app.config.get("ColorScheme", (None, None)) if color and highlight: @@ -409,8 +413,8 @@ def load_plugin(): # ba_meta export plugin class Main(ba.Plugin): - def __init__(self): - if _ba.env().get("build_number", 0) >= 20258: - load_plugin() - else: - print("ColorScheme.py only runs with BombSquad versions 1.7.0 or higher.") + def on_app_running(self): + load_plugin() + + def on_plugin_manager_prompt(self): + launch_colorscheme_selection_window()