v1.2.0 - Add on_plugin_manager_prompt method

This commit is contained in:
Rikko 2022-08-12 07:10:59 +05:30
parent 607663d2ac
commit e9e522acfc

View file

@ -367,7 +367,7 @@ class CustomTransactions:
_ba.add_transaction = self._handle _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 # We store whether the player is a pro account or not since we
# temporarily attempt to bypass the limitation where only pro # temporarily attempt to bypass the limitation where only pro
# accounts can set custom RGB color values, and we restore this # accounts can set custom RGB color values, and we restore this
@ -386,6 +386,10 @@ def colorscheme_transaction(transaction, *args, **kwargs):
ColorSchemeWindow() ColorSchemeWindow()
def colorscheme_transaction(transaction, *args, **kwargs):
launch_colorscheme_selection_window()
def load_colorscheme(): def load_colorscheme():
color, highlight = ba.app.config.get("ColorScheme", (None, None)) color, highlight = ba.app.config.get("ColorScheme", (None, None))
if color and highlight: if color and highlight:
@ -409,8 +413,8 @@ def load_plugin():
# ba_meta export plugin # ba_meta export plugin
class Main(ba.Plugin): class Main(ba.Plugin):
def __init__(self): def on_app_running(self):
if _ba.env().get("build_number", 0) >= 20258:
load_plugin() load_plugin()
else:
print("ColorScheme.py only runs with BombSquad versions 1.7.0 or higher.") def on_plugin_manager_prompt(self):
launch_colorscheme_selection_window()