From f7240a4b7fdb06961e9805073236108c605e35ca Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 13 Jan 2025 17:04:48 +0530 Subject: [PATCH 01/84] Updating plugman to api 9 --- plugin_manager.py | 449 ++++++++++++++++++---------------------------- 1 file changed, 178 insertions(+), 271 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index c39888c..d5778f9 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1,6 +1,5 @@ -# ba_meta require api 8 +# ba_meta require api 9 from babase._meta import EXPORT_CLASS_NAME_SHORTCUTS -from baenv import TARGET_BALLISTICA_BUILD import babase import _babase import bauiv1 as bui @@ -22,13 +21,11 @@ import pathlib import contextlib import hashlib import copy -import traceback -from typing import Union, Optional, cast +from typing import cast, override from datetime import datetime # Modules used for overriding AllSettingsWindow -from threading import Thread import logging PLUGIN_MANAGER_VERSION = "1.0.23" @@ -37,41 +34,6 @@ REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # plugin manager repo for testing purpose. CURRENT_TAG = "main" - -if TARGET_BALLISTICA_BUILD < 21282: - # These attributes have been deprecated as of 1.7.27. For more info see: - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1727-build-21282-api-8-2023-08-30 - # Adding a compatibility layer here so older builds still work fine. - class Dummy: - build_number = babase.app.build_number - device_name = babase.app.device_name - config_file_path = babase.app.config_file_path - version = babase.app.version - debug = babase.app.debug_build - test = babase.app.test_build - data_directory = babase.app.data_directory - python_directory_user = babase.app.python_directory_user - python_directory_app = babase.app.python_directory_app - python_directory_app_site = babase.app.python_directory_app_site - api_version = babase.app.api_version - tv = babase.app.on_tv - vr = babase.app.vr_mode - arcade = babase.app.arcade_mode - headless = babase.app.arcade_mode - demo = babase.app.demo_mode - - _bascenev1.protocol_version = lambda: babase.app.protocol_version - _bauiv1.toolbar_test = lambda: babase.app.toolbar_test - - babase.app.env = Dummy - -if TARGET_BALLISTICA_BUILD < 21852: - class Dummy(babase.app.env): - engine_build_number = babase.app.env.build_number - engine_version = babase.app.env.version - - babase.app.env = Dummy - _env = _babase.env() _uiscale = bui.app.ui_v1.uiscale @@ -1761,7 +1723,7 @@ class PluginCategoryWindow(popup.PopupMenuWindow): bui.containerwidget(edit=self.root_widget, transition='out_scale') -class PluginManagerWindow(bui.Window): +class PluginManagerWindow(bui.MainWindow): def __init__(self, transition: str = "in_right", origin_widget: bui.Widget = None): self.plugin_manager = PluginManager() self.category_selection_button = None @@ -1785,32 +1747,41 @@ class PluginManagerWindow(bui.Window): self._scale_origin = origin_widget.get_screen_space_center() transition = "in_scale" - super().__init__(root_widget=bui.containerwidget( - size=(self._width, self._height + top_extra), + super().__init__( + root_widget=bui.containerwidget( + size=(self._width, self._height + top_extra), + toolbar_visibility="menu_minimal", + scale=(1.9 if _uiscale is babase.UIScale.SMALL + else 1.5 if _uiscale is babase.UIScale.MEDIUM + else 1.0), + stack_offset=(0, -25) if _uiscale is babase.UIScale.SMALL else (0, 0) + ), transition=transition, - toolbar_visibility="menu_minimal", - scale_origin_stack_offset=self._scale_origin, - scale=(1.9 if _uiscale is babase.UIScale.SMALL - else 1.5 if _uiscale is babase.UIScale.MEDIUM - else 1.0), - stack_offset=(0, -25) if _uiscale is babase.UIScale.SMALL else (0, 0) - )) + origin_widget=origin_widget, + ) back_pos_x = 5 + (37 if _uiscale is babase.UIScale.SMALL else 27 if _uiscale is babase.UIScale.MEDIUM else 68) back_pos_y = self._height - (95 if _uiscale is babase.UIScale.SMALL else 65 if _uiscale is babase.UIScale.MEDIUM else 50) - self._back_button = back_button = bui.buttonwidget( - parent=self._root_widget, - position=(back_pos_x, back_pos_y), - size=(60, 60), - scale=0.8, - label=babase.charstr(babase.SpecialChar.BACK), - # autoselect=True, - button_type='backSmall', - on_activate_call=self._back) + + if _uiscale is bui.UIScale.SMALL: + self._back_button = None + bui.containerwidget( + edit=self._root_widget, on_cancel_call=self.main_window_back + ) + else: + self._back_button = back_button = bui.buttonwidget( + parent=self._root_widget, + position=(back_pos_x, back_pos_y), + size=(60, 60), + scale=0.8, + label=babase.charstr(babase.SpecialChar.BACK), + # autoselect=True, + button_type='backSmall', + on_activate_call=self.main_window_back) - bui.containerwidget(edit=self._root_widget, cancel_button=back_button) + bui.containerwidget(edit=self._root_widget, cancel_button=back_button) title_pos = self._height - (83 if _uiscale is babase.UIScale.SMALL else 50 if _uiscale is babase.UIScale.MEDIUM else 50) @@ -1842,47 +1813,37 @@ class PluginManagerWindow(bui.Window): ) self._dot_timer = babase.AppTimer(0.5, self._update_dots, repeat=True) - def _back(self) -> None: - from bauiv1lib.settings.allsettings import AllSettingsWindow - del self._last_filter_plugins - bui.containerwidget(edit=self._root_widget, - transition=self._transition_out) - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - AllSettingsWindow(transition='in_left').get_root_widget()) - else: - bui.app.ui_v1.set_main_menu_window( - AllSettingsWindow(transition='in_left').get_root_widget(), - from_window=self._root_widget,) - @contextlib.contextmanager def exception_handler(self): try: yield except urllib.error.URLError: self._dot_timer = None - bui.textwidget(edit=self._plugin_manager_status_text, - text="Make sure you are connected\n to the Internet and try again.") + try: + bui.textwidget( + edit=self._plugin_manager_status_text, + text="Make sure you are connected\n to the Internet and try again." + ) + except: pass self.plugin_manager._index_setup_in_progress = False except RuntimeError: # User probably went back before a bui.Window could finish loading. pass except Exception as e: self._dot_timer = None - bui.textwidget(edit=self._plugin_manager_status_text, - text=str(e)) + try: + bui.textwidget(edit=self._plugin_manager_status_text, text=str(e)) + except: pass raise def _update_dots(self): - text = cast(str, bui.textwidget(query=self._plugin_manager_status_text)) - if text.endswith('....'): - text = text[0:len(text)-4] - text = text + '.' - bui.textwidget(edit=self._plugin_manager_status_text, - text=text) + try: + text = cast(str, bui.textwidget(query=self._plugin_manager_status_text)) + if text.endswith('....'): + text = text[0:len(text)-4] + bui.textwidget(edit=self._plugin_manager_status_text, text=(text + '.')) + except: + pass async def draw_index(self): self.draw_search_bar() @@ -1894,8 +1855,9 @@ class PluginManagerWindow(bui.Window): await self.plugin_manager.setup_changelog() await self.plugin_manager.setup_index() self._dot_timer = None - bui.textwidget(edit=self._plugin_manager_status_text, - text="") + try: + bui.textwidget(edit=self._plugin_manager_status_text, text="") + except: pass await self.select_category("All") def draw_plugins_scroll_bar(self): @@ -2238,8 +2200,9 @@ class PluginManagerWindow(bui.Window): async def refresh(self): self.cleanup() - bui.textwidget(edit=self._plugin_manager_status_text, - text="Refreshing") + try: + bui.textwidget(edit=self._plugin_manager_status_text, text="Refreshing") + except: pass if self._dot_timer is None: self._dot_timer = babase.AppTimer(0.5, self._update_dots, repeat=True) @@ -2248,8 +2211,9 @@ class PluginManagerWindow(bui.Window): await self.plugin_manager.setup_changelog() await self.plugin_manager.setup_index() self._dot_timer = None - bui.textwidget(edit=self._plugin_manager_status_text, - text="") + try: + bui.textwidget(edit=self._plugin_manager_status_text, text="") + except: pass await self.select_category(self.selected_category) def soft_refresh(self): @@ -2494,12 +2458,12 @@ class PluginManagerSettingsWindow(popup.PopupWindow): bui.containerwidget(edit=self._root_widget, transition='out_scale') -class NewAllSettingsWindow(bui.Window): +class NewAllSettingsWindow(bui.MainWindow): """Window for selecting a settings category.""" def __init__( self, - transition: str = 'in_right', + transition: str | None = 'in_right', origin_widget: bui.Widget | None = None, ): # pylint: disable=too-many-statements @@ -2507,67 +2471,63 @@ class NewAllSettingsWindow(bui.Window): # Preload some modules we use in a background thread so we won't # have a visual hitch when the user taps them. - Thread(target=self._preload_modules).start() + bui.app.threadpool.submit_no_wait(self._preload_modules) bui.set_analytics_screen('Settings Window') - scale_origin: tuple[float, float] | None - if origin_widget is not None: - self._transition_out = 'out_scale' - scale_origin = origin_widget.get_screen_space_center() - transition = 'in_scale' - else: - self._transition_out = 'out_right' - scale_origin = None assert bui.app.classic is not None - width = 900 if _uiscale is bui.UIScale.SMALL else 670 - x_inset = 75 if _uiscale is bui.UIScale.SMALL else 0 - height = 435 + uiscale = bui.app.ui_v1.uiscale + width = 1000 if uiscale is bui.UIScale.SMALL else 800 + x_inset = 125 if uiscale is bui.UIScale.SMALL else 105 + height = 490 self._r = 'settingsWindow' - top_extra = 20 if _uiscale is bui.UIScale.SMALL else 0 + top_extra = 20 if uiscale is bui.UIScale.SMALL else 0 + uiscale = bui.app.ui_v1.uiscale super().__init__( root_widget=bui.containerwidget( size=(width, height + top_extra), - transition=transition, - toolbar_visibility='menu_minimal', - scale_origin_stack_offset=scale_origin, - scale=( - 1.75 - if _uiscale is bui.UIScale.SMALL - else 1.35 - if _uiscale is bui.UIScale.MEDIUM - else 1.0 + toolbar_visibility=( + 'menu_minimal' + if uiscale is bui.UIScale.SMALL + else 'menu_full' ), - stack_offset=(0, -8) - if _uiscale is bui.UIScale.SMALL - else (0, 0), - ) + scale=( + 1.5 + if uiscale is bui.UIScale.SMALL + else 1.25 if uiscale is bui.UIScale.MEDIUM else 1.0 + ), + stack_offset=( + (0, 0) if uiscale is bui.UIScale.SMALL else (0, 0) + ), + ), + transition=transition, + origin_widget=origin_widget, ) - if bui.app.ui_v1.use_toolbars and _uiscale is bui.UIScale.SMALL: + if uiscale is bui.UIScale.SMALL: self._back_button = None bui.containerwidget( - edit=self._root_widget, on_cancel_call=self._do_back + edit=self._root_widget, on_cancel_call=self.main_window_back ) else: self._back_button = btn = bui.buttonwidget( parent=self._root_widget, autoselect=True, - position=(40 + x_inset, height - 55), + position=(x_inset - 20, height - 85), size=(130, 60), scale=0.8, text_scale=1.2, label=bui.Lstr(resource='backText'), button_type='back', - on_activate_call=self._do_back, + on_activate_call=self.main_window_back, ) bui.containerwidget(edit=self._root_widget, cancel_button=btn) bui.textwidget( parent=self._root_widget, - position=(0, height - 44), + position=(0, height - 80), size=(width, 25), - text=bui.Lstr(resource=self._r + '.titleText'), + text=bui.Lstr(resource=f'{self._r}.titleText'), color=bui.app.ui_v1.title_color, h_align='center', v_align='center', @@ -2582,19 +2542,23 @@ class NewAllSettingsWindow(bui.Window): label=bui.charstr(bui.SpecialChar.BACK), ) - v = height - 80 + v = height - 120 v -= 145 - basew = 200 - baseh = 160 + basew = 280 if uiscale is bui.UIScale.SMALL else 230 + baseh = 170 x_offs = ( - x_inset + (105 if _uiscale is bui.UIScale.SMALL else 72) - basew + x_inset + (105 if uiscale is bui.UIScale.SMALL else 72) - basew ) # now unused + x_dif = (basew - 7) / 2 x_offs2 = x_offs + basew - 7 x_offs3 = x_offs + 2 * (basew - 7) x_offs4 = x_offs + 3 * (basew - 7) - x_offs5 = x_offs2 + 0.5 * (basew - 7) - x_offs6 = x_offs5 + (basew - 7) + x_offs5 = x_offs2 + x_offs6 = x_offs3 + x_offs2 -= x_dif + x_offs3 -= x_dif + x_offs4 -= x_dif def _b_title( x: float, y: float, button: bui.Widget, text: str | bui.Lstr @@ -2620,11 +2584,11 @@ class NewAllSettingsWindow(bui.Window): label='', on_activate_call=self._do_controllers, ) - if bui.app.ui_v1.use_toolbars and self._back_button is None: + if self._back_button is None: bbtn = bui.get_special_widget('back_button') bui.widget(edit=ctb, left_widget=bbtn) _b_title( - x_offs2, v, ctb, bui.Lstr(resource=self._r + '.controllersText') + x_offs2, v, ctb, bui.Lstr(resource=f'{self._r}.controllersText') ) imgw = imgh = 130 bui.imagewidget( @@ -2644,10 +2608,9 @@ class NewAllSettingsWindow(bui.Window): label='', on_activate_call=self._do_graphics, ) - if bui.app.ui_v1.use_toolbars: - pbtn = bui.get_special_widget('party_button') - bui.widget(edit=gfxb, up_widget=pbtn, right_widget=pbtn) - _b_title(x_offs3, v, gfxb, bui.Lstr(resource=self._r + '.graphicsText')) + pbtn = bui.get_special_widget('squad_button') + bui.widget(edit=gfxb, up_widget=pbtn, right_widget=pbtn) + _b_title(x_offs3, v, gfxb, bui.Lstr(resource=f'{self._r}.graphicsText')) imgw = imgh = 110 bui.imagewidget( parent=self._root_widget, @@ -2666,7 +2629,7 @@ class NewAllSettingsWindow(bui.Window): label='', on_activate_call=self._do_audio, ) - _b_title(x_offs4, v, abtn, bui.Lstr(resource=self._r + '.audioText')) + _b_title(x_offs4, v, abtn, bui.Lstr(resource=f'{self._r}.audioText')) imgw = imgh = 120 bui.imagewidget( parent=self._root_widget, @@ -2688,7 +2651,7 @@ class NewAllSettingsWindow(bui.Window): label='', on_activate_call=self._do_advanced, ) - _b_title(x_offs5, v, avb, bui.Lstr(resource=self._r + '.advancedText')) + _b_title(x_offs5, v, avb, bui.Lstr(resource=f'{self._r}.advancedText')) imgw = imgh = 120 bui.imagewidget( parent=self._root_widget, @@ -2699,160 +2662,106 @@ class NewAllSettingsWindow(bui.Window): draw_controller=avb, ) - mmb = self._modmgr_button = bui.buttonwidget(parent=self._root_widget, - autoselect=True, - position=(x_offs6, v), - size=(basew, baseh), - button_type="square", - label="", - on_activate_call=self._do_modmanager) - _b_title(x_offs6, v, mmb, bui.Lstr(value="Plugin Manager")) - imgw = imgh = 112 - bui.imagewidget(parent=self._root_widget, - position=(x_offs6 + basew * 0.49 - imgw * 0.5 + 5, - v + 35), - size=(imgw, imgh), - color=(0.8, 0.95, 1), - texture=bui.gettexture("storeIcon"), - draw_controller=mmb) - + pmb = self._plugman_button = bui.buttonwidget( + parent=self._root_widget, + autoselect=True, + position=(x_offs6, v), + size=(basew, baseh), + button_type='square', + label='', + on_activate_call=self._do_plugman, + ) + _b_title(x_offs6, v, pmb, bui.Lstr(value="Plugin Manager")) + imgw = imgh = 120 + bui.imagewidget( + parent=self._root_widget, + position=(x_offs6 + basew * 0.49 - imgw * 0.5 + 5, v + 35), + size=(imgw, imgh), + color=(0.8, 0.95, 1), + texture=bui.gettexture('storeIcon'), + draw_controller=pmb, + ) self._restore_state() - # noinspection PyUnresolvedReferences + @override + def get_main_window_state(self) -> bui.MainWindowState: + # Support recreating our window for back/refresh purposes. + cls = type(self) + return bui.BasicMainWindowState( + create_call=lambda transition, origin_widget: cls( + transition=transition, origin_widget=origin_widget + ) + ) + + @override + def on_main_window_close(self) -> None: + self._save_state() + @staticmethod def _preload_modules() -> None: - """Preload modules we use (called in bg thread).""" + """Preload modules we use; avoids hitches (called in bg thread).""" import bauiv1lib.mainmenu as _unused1 import bauiv1lib.settings.controls as _unused2 import bauiv1lib.settings.graphics as _unused3 import bauiv1lib.settings.audio as _unused4 import bauiv1lib.settings.advanced as _unused5 - def _do_back(self) -> None: - # pylint: disable=cyclic-import - from bauiv1lib.mainmenu import MainMenuWindow - - self._save_state() - bui.containerwidget( - edit=self._root_widget, transition=self._transition_out - ) - assert bui.app.classic is not None - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - MainMenuWindow(transition='in_left').get_root_widget(),) - else: - bui.app.ui_v1.set_main_menu_window( - MainMenuWindow(transition='in_left').get_root_widget(), - from_window=self._root_widget,) - def _do_controllers(self) -> None: # pylint: disable=cyclic-import from bauiv1lib.settings.controls import ControlsSettingsWindow - self._save_state() - bui.containerwidget(edit=self._root_widget, transition='out_left') - assert bui.app.classic is not None - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - ControlsSettingsWindow( - origin_widget=self._controllers_button - ).get_root_widget(),) - else: - bui.app.ui_v1.set_main_menu_window( - ControlsSettingsWindow( - origin_widget=self._controllers_button - ).get_root_widget(), - from_window=self._root_widget,) + # no-op if we're not in control. + if not self.main_window_has_control(): + return + + self.main_window_replace( + ControlsSettingsWindow(origin_widget=self._controllers_button) + ) def _do_graphics(self) -> None: # pylint: disable=cyclic-import from bauiv1lib.settings.graphics import GraphicsSettingsWindow - self._save_state() - bui.containerwidget(edit=self._root_widget, transition='out_left') - assert bui.app.classic is not None - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - GraphicsSettingsWindow( - origin_widget=self._graphics_button - ).get_root_widget(),) - else: - bui.app.ui_v1.set_main_menu_window( - GraphicsSettingsWindow( - origin_widget=self._graphics_button - ).get_root_widget(), - from_window=self._root_widget,) + # no-op if we're not in control. + if not self.main_window_has_control(): + return + + self.main_window_replace( + GraphicsSettingsWindow(origin_widget=self._graphics_button) + ) def _do_audio(self) -> None: # pylint: disable=cyclic-import from bauiv1lib.settings.audio import AudioSettingsWindow - self._save_state() - bui.containerwidget(edit=self._root_widget, transition='out_left') - assert bui.app.classic is not None - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - AudioSettingsWindow( - origin_widget=self._audio_button - ).get_root_widget(),) - else: - bui.app.ui_v1.set_main_menu_window( - AudioSettingsWindow( - origin_widget=self._audio_button - ).get_root_widget(), - from_window=self._root_widget,) + # no-op if we're not in control. + if not self.main_window_has_control(): + return + + self.main_window_replace( + AudioSettingsWindow(origin_widget=self._audio_button) + ) def _do_advanced(self) -> None: # pylint: disable=cyclic-import from bauiv1lib.settings.advanced import AdvancedSettingsWindow - self._save_state() - bui.containerwidget(edit=self._root_widget, transition='out_left') - assert bui.app.classic is not None - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - AdvancedSettingsWindow( - origin_widget=self._advanced_button - ).get_root_widget()) - else: - bui.app.ui_v1.set_main_menu_window( - AdvancedSettingsWindow( - origin_widget=self._advanced_button - ).get_root_widget(), - from_window=self._root_widget,) + # no-op if we're not in control. + if not self.main_window_has_control(): + return - def _do_modmanager(self) -> None: - self._save_state() - bui.containerwidget(edit=self._root_widget, transition="out_left") - if TARGET_BALLISTICA_BUILD < 21697: - # from_window parameter was added in 1.7.30, see changelogs below - # https://github.com/efroemling/ballistica/blob/master/CHANGELOG.md#1730-build-21697-api-8-2023-12-08 - # Adding a check here so older builds still work fine. - bui.app.ui_v1.set_main_menu_window( - PluginManagerWindow( - origin_widget=self._modmgr_button - ).get_root_widget(),) - else: - bui.app.ui_v1.set_main_menu_window( - PluginManagerWindow( - origin_widget=self._modmgr_button - ).get_root_widget(), - from_window=self._root_widget,) + self.main_window_replace( + AdvancedSettingsWindow(origin_widget=self._advanced_button) + ) + + def _do_plugman(self) -> None: + # no-op if we're not in control. + if not self.main_window_has_control(): + return + + self.main_window_replace( + PluginManagerWindow(origin_widget=self._plugman_button) + ) def _save_state(self) -> None: try: @@ -2865,16 +2774,14 @@ class NewAllSettingsWindow(bui.Window): sel_name = 'Audio' elif sel == self._advanced_button: sel_name = 'Advanced' - elif sel == self._modmgr_button: - sel_name = 'Mod Manager' + elif sel == self._plugman_button: + sel_name = 'PlugMan' elif sel == self._back_button: sel_name = 'Back' else: raise ValueError(f'unrecognized selection \'{sel}\'') assert bui.app.classic is not None - bui.app.ui_v1.window_states[type(self)] = { - 'sel_name': sel_name - } + bui.app.ui_v1.window_states[type(self)] = {'sel_name': sel_name} except Exception: logging.exception('Error saving state for %s.', self) @@ -2893,8 +2800,8 @@ class NewAllSettingsWindow(bui.Window): sel = self._audio_button elif sel_name == 'Advanced': sel = self._advanced_button - elif sel_name == "Mod Manager": - sel = self._modmgr_button + elif sel_name == "PlugMan": + sel = self._plugman_button elif sel_name == 'Back': sel = self._back_button else: From 1c7cfc7a583ffb0c8ed32c31127ef0d273669e53 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 14 Jan 2025 16:49:58 +0530 Subject: [PATCH 02/84] A few changes and fixes --- plugin_manager.py | 255 ++++++---------------------------------------- 1 file changed, 33 insertions(+), 222 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index d5778f9..c5e8c42 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1,29 +1,30 @@ # ba_meta require api 9 -from babase._meta import EXPORT_CLASS_NAME_SHORTCUTS import babase import _babase -import bauiv1 as bui import _bauiv1 import _bascenev1 +import bauiv1 as bui from bauiv1lib import popup, confirm +from babase._meta import EXPORT_CLASS_NAME_SHORTCUTS +from bauiv1lib.settings.allsettings import AllSettingsWindow import urllib.request import http.client import socket -import ssl import json +import ssl +import re import os import sys -import asyncio -import re -import pathlib -import contextlib -import hashlib import copy +import asyncio +import pathlib +import hashlib +import contextlib -from typing import cast, override from datetime import datetime +from typing import cast, override # Modules used for overriding AllSettingsWindow import logging @@ -616,21 +617,8 @@ class PluginLocal: for entry_point, plugin_info in babase.app.config["Plugins"].items(): if entry_point.startswith(self._entry_point_initials) and plugin_info["enabled"]: return True - # XXX: The below logic is more accurate but less efficient, since it actually - # reads the local plugin file and parses entry points from it. - # for entry_point in await self.get_entry_points(): - # if babase.app.config["Plugins"][entry_point]["enabled"]: - # return True return False - # XXX: Commenting this out for now, since `enable` and `disable` currently have their - # own separate logic. - # async def _set_status(self, to_enable=True): - # for entry_point in await self.get_entry_points: - # if entry_point not in babase.app.config["Plugins"]: - # babase.app.config["Plugins"][entry_point] = {} - # babase.app.config["Plugins"][entry_point]["enabled"] = to_enable - async def enable(self): for entry_point in await self.get_entry_points(): if entry_point not in babase.app.config["Plugins"]: @@ -642,7 +630,6 @@ class PluginLocal: bui.screenmessage(f"{entry_point} loaded") if await self.has_minigames(): self.load_minigames() - # await self._set_status(to_enable=True) self.save() def load_plugin(self, entry_point): @@ -659,11 +646,7 @@ class PluginLocal: def disable(self): for entry_point, plugin_info in babase.app.config["Plugins"].items(): if entry_point.startswith(self._entry_point_initials): - # if plugin_info["enabled"]: plugin_info["enabled"] = False - # XXX: The below logic is more accurate but less efficient, since it actually - # reads the local plugin file and parses entry points from it. - # await self._set_status(to_enable=False) self.save() def set_version(self, version): @@ -671,15 +654,6 @@ class PluginLocal: app.config["Community Plugin Manager"]["Installed Plugins"][self.name]["version"] = version return self - # def set_entry_points(self): - # if not "entry_points" in babase.app.config["Community Plugin Manager"] - # ["Installed Plugins"][self.name]: - # babase.app.config["Community Plugin Manager"]["Installed Plugins"] - # [self.name]["entry_points"] = [] - # for entry_point in await self.get_entry_points(): - # babase.app.config["Community Plugin Manager"]["Installed Plugins"][self.name] - # ["entry_points"].append(entry_point) - async def set_content(self, content): if not self._content: @@ -894,7 +868,6 @@ class ChangelogWindow(popup.PopupWindow): size=(60, 60), scale=0.8, label=babase.charstr(babase.SpecialChar.BACK), - # autoselect=True, button_type='backSmall', on_activate_call=self._back) @@ -974,7 +947,6 @@ class AuthorsWindow(popup.PopupWindow): size=(60, 60), scale=0.8, label=babase.charstr(babase.SpecialChar.BACK), - # autoselect=True, button_type='backSmall', on_activate_call=self._back) @@ -1058,8 +1030,6 @@ class PluginWindow(popup.PopupWindow): transition = 'in_scale' self._root_widget = bui.containerwidget(size=(width, height), - # parent=_babase.get_special_widget( - # 'overlay_stack'), on_outside_click_call=self._cancel, transition=transition, scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 @@ -1096,14 +1066,8 @@ class PluginWindow(popup.PopupWindow): maxwidth=width * 0.9, draw_controller=author_text_control_btn, ) - pos -= 35 - # status = bui.textwidget(parent=self._root_widget, - # position=(width * 0.49, pos), size=(0, 0), - # h_align='center', v_align='center', - # text=status_text, scale=text_scale * 0.8, - # color=color, maxwidth=width * 0.9) - pos -= 25 - # info = + pos -= 60 + # Info bui.textwidget(parent=self._root_widget, position=(width * 0.49, pos), size=(0, 0), h_align='center', v_align='center', @@ -1195,7 +1159,6 @@ class PluginWindow(popup.PopupWindow): size=(40, 40), button_type="square", label="", - # color=bui.app.ui_v1.title_color, color=(0.6, 0.53, 0.63), on_activate_call=lambda: bui.open_url(self.plugin.view_url)) bui.imagewidget(parent=self._root_widget, @@ -1232,7 +1195,6 @@ class PluginWindow(popup.PopupWindow): size=(40, 40), button_type="square", label="", - # color=bui.app.ui_v1.title_color, color=(0.6, 0.53, 0.63), on_activate_call=tutorial_confirm_window) @@ -1274,9 +1236,6 @@ class PluginWindow(popup.PopupWindow): texture=bui.gettexture("settingsIcon"), draw_controller=settings_button) - # bui.containerwidget(edit=self._root_widget, selected_child=button3) - # bui.containerwidget(edit=self._root_widget, start_button=button3) - def _ok(self) -> None: bui.containerwidget(edit=self._root_widget, transition='out_scale') @@ -1512,13 +1471,9 @@ class PluginSourcesWindow(popup.PopupWindow): self.scale_origin = origin_widget.get_screen_space_center() b_textcolor = (0.75, 0.7, 0.8) - # s = 1.1 if _uiscale is babase.UIScale.SMALL else 1.27 if babase.UIScale.MEDIUM else 1.57 - # text_scale = 0.7 * s self._transition_out = 'out_scale' transition = 'in_scale' self._root_widget = bui.containerwidget(size=(400, 340), - # parent=_babase.get_special_widget( - # 'overlay_stack'), on_outside_click_call=self._ok, transition=transition, scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 @@ -1558,21 +1513,15 @@ class PluginSourcesWindow(popup.PopupWindow): delete_source_button = bui.buttonwidget(parent=self._root_widget, position=(delete_source_button_position_pos_x, delete_source_button_position_pos_y), - size=(25, 25), + size=(25, 25), label="", on_activate_call=self.delete_selected_source, - label="", - # texture=bui.gettexture("crossOut"), button_type="square", - color=(0.6, 0, 0), - textcolor=b_textcolor, - # autoselect=True, - text_scale=1) + color=(0.6, 0, 0)) bui.imagewidget(parent=self._root_widget, position=(delete_source_button_position_pos_x + 2, delete_source_button_position_pos_y), - size=(25, 25), - color=(5, 2, 2), + size=(25, 25), color=(5, 2, 2), texture=bui.gettexture("crossOut"), draw_controller=delete_source_button) @@ -1593,7 +1542,6 @@ class PluginSourcesWindow(popup.PopupWindow): ) self._add_source_widget = bui.textwidget(parent=self._root_widget, - # text="rikkolovescats/sahilp-plugins", size=(335, 50), position=(21, 22), h_align='left', @@ -1601,7 +1549,6 @@ class PluginSourcesWindow(popup.PopupWindow): editable=True, scale=0.75, maxwidth=215, - # autoselect=True, description="Add Source") bui.buttonwidget(parent=self._root_widget, @@ -1610,11 +1557,9 @@ class PluginSourcesWindow(popup.PopupWindow): on_activate_call=lambda: loop.create_task(self.add_source()), label="", texture=bui.gettexture("startButton"), - # texture=bui.gettexture("chestOpenIcon"), button_type="square", color=(0, 0.9, 0), textcolor=b_textcolor, - # autoselect=True, text_scale=1) self.draw_sources() @@ -1626,12 +1571,9 @@ class PluginSourcesWindow(popup.PopupWindow): color = (1, 1, 1) for custom_source in babase.app.config["Community Plugin Manager"]["Custom Sources"]: bui.textwidget(parent=self._columnwidget, - # size=(410, 30), selectable=True, - # always_highlight=True, color=color, text=custom_source, - # click_activate=True, on_select_call=lambda: self.select_source(custom_source), h_align='left', v_align='center', @@ -1777,7 +1719,6 @@ class PluginManagerWindow(bui.MainWindow): size=(60, 60), scale=0.8, label=babase.charstr(babase.SpecialChar.BACK), - # autoselect=True, button_type='backSmall', on_activate_call=self.main_window_back) @@ -1882,9 +1823,7 @@ class PluginManagerWindow(bui.MainWindow): category_pos_y = self._height - (141 if _uiscale is babase.UIScale.SMALL else 110 if _uiscale is babase.UIScale.MEDIUM else 110) b_size = (140, 30) - # b_textcolor = (0.75, 0.7, 0.8) b_textcolor = (0.8, 0.8, 0.85) - # b_color = (0.6, 0.53, 0.63) if self.alphabet_order_selection_button is None: self.alphabet_order_selection_button = bui.buttonwidget(parent=self._root_widget, @@ -1916,9 +1855,7 @@ class PluginManagerWindow(bui.MainWindow): self.show_categories_window), label=label, button_type="square", - # color=b_color, textcolor=b_textcolor, - # autoselect=True, text_scale=0.6) else: self.category_selection_button = bui.buttonwidget(edit=self.category_selection_button, @@ -1997,21 +1934,6 @@ class PluginManagerWindow(bui.MainWindow): self.selected_category, search_term=filter_text.lower(), order=self.selected_alphabet_order) except CategoryDoesNotExist: pass - # XXX: This may be more efficient, but we need a way to get a plugin's textwidget - # attributes like color, position and more. - # for plugin in self._columnwidget.get_children(): - # for name, widget in tuple(self.plugins_in_current_view.items()): - # # print(bui.textwidget(query=plugin)) - # # plugin.delete() - # print(dir(widget)) - # if filter_text in name: - # import random - # if random.random() > 0.9: - # bui.textwidget(edit=widget).delete() - # else: - # bui.textwidget(edit=widget, position=None) - # else: - # bui.textwidget(edit=widget, position=None) def draw_settings_icon(self): settings_pos_x = (610 if _uiscale is babase.UIScale.SMALL else @@ -2019,7 +1941,6 @@ class PluginManagerWindow(bui.MainWindow): settings_pos_y = (130 if _uiscale is babase.UIScale.SMALL else 60 if _uiscale is babase.UIScale.MEDIUM else 70) controller_button = bui.buttonwidget(parent=self._root_widget, - # autoselect=True, position=(settings_pos_x, settings_pos_y), size=(30, 30), button_type="square", @@ -2041,7 +1962,6 @@ class PluginManagerWindow(bui.MainWindow): 108 if _uiscale is babase.UIScale.MEDIUM else 120) controller_button = bui.buttonwidget(parent=self._root_widget, - # autoselect=True, position=(refresh_pos_x, refresh_pos_y), size=(30, 30), button_type="square", @@ -2057,24 +1977,16 @@ class PluginManagerWindow(bui.MainWindow): def search_term_filterer(self, plugin, search_term): # This helps resolve "plugin name" to "plugin_name". + if search_term in plugin.info["description"].lower(): + return True search_term = search_term.replace(" ", "_") if search_term in plugin.name: return True - if search_term in plugin.info["description"].lower(): - return True for author in plugin.info["authors"]: if search_term in author["name"].lower(): return True return False - # async def draw_plugin_names(self, category): - # for plugin in self._columnwidget.get_children(): - # plugin.delete() - - # plugins = await self.plugin_manager.categories[category].get_plugins() - # plugin_names_to_draw = tuple(self.draw_plugin_name(plugin) for plugin in plugins) - # await asyncio.gather(*plugin_names_to_draw) - # XXX: Not sure if this is the best way to handle search filters. async def draw_plugin_names(self, category, search_term="", refresh=False, order='a_z'): # Re-draw plugin list UI if either search term or category was switched. @@ -2161,7 +2073,6 @@ class PluginManagerWindow(bui.MainWindow): selectable=True, always_highlight=True, color=color, - # on_select_call=lambda: None, text=plugin.name.replace('_', ' ').title(), click_activate=True, on_activate_call=lambda: self.show_plugin_window(plugin), @@ -2246,8 +2157,6 @@ class PluginManagerSettingsWindow(popup.PopupWindow): button_size = (32 * s, 32 * s) # index = await self._plugin_manager.get_index() self._root_widget = bui.containerwidget(size=(width, height), - # parent=_babase.get_special_widget( - # 'overlay_stack'), on_outside_click_call=self._ok, transition=transition, scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 @@ -2361,8 +2270,7 @@ class PluginManagerSettingsWindow(popup.PopupWindow): color=(1, 1, 1), draw_controller=self.github_button) - bui.containerwidget(edit=self._root_widget, - on_cancel_call=self._ok) + bui.containerwidget(edit=self._root_widget, on_cancel_call=self._ok) try: plugin_manager_update_available = await self._plugin_manager.get_update_details() @@ -2370,7 +2278,6 @@ class PluginManagerSettingsWindow(popup.PopupWindow): plugin_manager_update_available = False if plugin_manager_update_available: text_color = (0.75, 0.2, 0.2) - button_size = (95 * s, 32 * s) update_button_label = f'Update to v{plugin_manager_update_available[0]}' self._update_button = bui.buttonwidget(parent=self._root_widget, @@ -2424,14 +2331,10 @@ class PluginManagerSettingsWindow(popup.PopupWindow): def toggle_setting(self, setting, set_value): self.settings[setting] = set_value - if self.settings == babase.app.config["Community Plugin Manager"]["Settings"]: - bui.buttonwidget(edit=self._save_button, - scale=0, - selectable=False) - else: - bui.buttonwidget(edit=self._save_button, - scale=1, - selectable=True) + check = self.settings == babase.app.config["Community Plugin Manager"]["Settings"] + bui.buttonwidget(edit=self._save_button, + scale=0 if check else 1, + selectable=(not check)) def save_settings_button(self): babase.app.config["Community Plugin Manager"]["Settings"] = self.settings.copy() @@ -2458,7 +2361,7 @@ class PluginManagerSettingsWindow(popup.PopupWindow): bui.containerwidget(edit=self._root_widget, transition='out_scale') -class NewAllSettingsWindow(bui.MainWindow): +class NewAllSettingsWindow(AllSettingsWindow): """Window for selecting a settings category.""" def __init__( @@ -2468,40 +2371,21 @@ class NewAllSettingsWindow(bui.MainWindow): ): # pylint: disable=too-many-statements # pylint: disable=too-many-locals - - # Preload some modules we use in a background thread so we won't - # have a visual hitch when the user taps them. - bui.app.threadpool.submit_no_wait(self._preload_modules) - - bui.set_analytics_screen('Settings Window') assert bui.app.classic is not None uiscale = bui.app.ui_v1.uiscale width = 1000 if uiscale is bui.UIScale.SMALL else 800 x_inset = 125 if uiscale is bui.UIScale.SMALL else 105 height = 490 - self._r = 'settingsWindow' top_extra = 20 if uiscale is bui.UIScale.SMALL else 0 + self._plugman_button = None - uiscale = bui.app.ui_v1.uiscale - super().__init__( - root_widget=bui.containerwidget( - size=(width, height + top_extra), - toolbar_visibility=( - 'menu_minimal' - if uiscale is bui.UIScale.SMALL - else 'menu_full' - ), - scale=( - 1.5 - if uiscale is bui.UIScale.SMALL - else 1.25 if uiscale is bui.UIScale.MEDIUM else 1.0 - ), - stack_offset=( - (0, 0) if uiscale is bui.UIScale.SMALL else (0, 0) - ), - ), - transition=transition, - origin_widget=origin_widget, + super().__init__(transition, origin_widget) + + for child in self._root_widget.get_children(): + child.delete() + + bui.containerwidget( + edit=self._root_widget, size=(width, height + top_extra) ) if uiscale is bui.UIScale.SMALL: @@ -2542,9 +2426,7 @@ class NewAllSettingsWindow(bui.MainWindow): label=bui.charstr(bui.SpecialChar.BACK), ) - v = height - 120 - v -= 145 - + v = height - 265 basew = 280 if uiscale is bui.UIScale.SMALL else 230 baseh = 170 x_offs = ( @@ -2662,7 +2544,7 @@ class NewAllSettingsWindow(bui.MainWindow): draw_controller=avb, ) - pmb = self._plugman_button = bui.buttonwidget( + self._plugman_button = pmb = bui.buttonwidget( parent=self._root_widget, autoselect=True, position=(x_offs6, v), @@ -2683,77 +2565,6 @@ class NewAllSettingsWindow(bui.MainWindow): ) self._restore_state() - @override - def get_main_window_state(self) -> bui.MainWindowState: - # Support recreating our window for back/refresh purposes. - cls = type(self) - return bui.BasicMainWindowState( - create_call=lambda transition, origin_widget: cls( - transition=transition, origin_widget=origin_widget - ) - ) - - @override - def on_main_window_close(self) -> None: - self._save_state() - - @staticmethod - def _preload_modules() -> None: - """Preload modules we use; avoids hitches (called in bg thread).""" - import bauiv1lib.mainmenu as _unused1 - import bauiv1lib.settings.controls as _unused2 - import bauiv1lib.settings.graphics as _unused3 - import bauiv1lib.settings.audio as _unused4 - import bauiv1lib.settings.advanced as _unused5 - - def _do_controllers(self) -> None: - # pylint: disable=cyclic-import - from bauiv1lib.settings.controls import ControlsSettingsWindow - - # no-op if we're not in control. - if not self.main_window_has_control(): - return - - self.main_window_replace( - ControlsSettingsWindow(origin_widget=self._controllers_button) - ) - - def _do_graphics(self) -> None: - # pylint: disable=cyclic-import - from bauiv1lib.settings.graphics import GraphicsSettingsWindow - - # no-op if we're not in control. - if not self.main_window_has_control(): - return - - self.main_window_replace( - GraphicsSettingsWindow(origin_widget=self._graphics_button) - ) - - def _do_audio(self) -> None: - # pylint: disable=cyclic-import - from bauiv1lib.settings.audio import AudioSettingsWindow - - # no-op if we're not in control. - if not self.main_window_has_control(): - return - - self.main_window_replace( - AudioSettingsWindow(origin_widget=self._audio_button) - ) - - def _do_advanced(self) -> None: - # pylint: disable=cyclic-import - from bauiv1lib.settings.advanced import AdvancedSettingsWindow - - # no-op if we're not in control. - if not self.main_window_has_control(): - return - - self.main_window_replace( - AdvancedSettingsWindow(origin_widget=self._advanced_button) - ) - def _do_plugman(self) -> None: # no-op if we're not in control. if not self.main_window_has_control(): From 835c52b7a0930043e63e4f19d08b01a9679ad3c2 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 21:28:45 +0530 Subject: [PATCH 03/84] Updated a advanced_party_window, mood_light and README --- README.md | 8 +++----- plugins/utilities/advanced_party_window.py | 2 +- plugins/utilities/mood_light.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fc5b3ae..86d2222 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) -**Important:** Please check out the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch if you're -using the game version (1.7.0 <= your game version <= 1.7.19) which uses API 7 plugins. -If you're on game version (1.7.20 or a later version) where it uses API 8 plugins, then proceed with the rest of the -README here. - +**Important:** For bombsquad version < 1.7.37 +- for version 1.7.0 to 1.7.19 checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch +- for version 1.7.20 to 1.7.36 checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch ------------------------------- # Plugin-Manager diff --git a/plugins/utilities/advanced_party_window.py b/plugins/utilities/advanced_party_window.py index a38d78a..6a1cef9 100644 --- a/plugins/utilities/advanced_party_window.py +++ b/plugins/utilities/advanced_party_window.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# ba_meta require api 8 +# ba_meta require api 9 ''' AdvancedPartyWindow by Mr.Smoothy diff --git a/plugins/utilities/mood_light.py b/plugins/utilities/mood_light.py index 81ca17c..f9f37d8 100644 --- a/plugins/utilities/mood_light.py +++ b/plugins/utilities/mood_light.py @@ -1,5 +1,5 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING, cast if TYPE_CHECKING: From 2a0f33aa18e3b3dbba8a73b0d0bcbc778fcbb748 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 03:15:53 +0530 Subject: [PATCH 04/84] Updated many plugins for api 9 --- plugins/utilities.json | 5 +++++ plugins/utilities/allow_invisible_models.py | 2 +- plugins/utilities/autorun.py | 3 ++- plugins/utilities/bomb_radius_visualizer.py | 2 +- plugins/utilities/bots_can_accept_powerups.py | 2 +- plugins/utilities/character_chooser.py | 2 +- plugins/utilities/colorscheme.py | 2 +- plugins/utilities/custom_death.py | 2 +- plugins/utilities/discord_richpresence.py | 2 +- plugins/utilities/file_share.py | 2 +- plugins/utilities/health_indicator.py | 2 +- plugins/utilities/icons_keyboard.py | 2 +- plugins/utilities/only_night.py | 2 +- plugins/utilities/party_filter.py | 2 +- plugins/utilities/ragdoll_b_gone.py | 2 +- plugins/utilities/random_join.py | 2 +- plugins/utilities/share_replay.py | 2 +- plugins/utilities/sorry.py | 2 +- plugins/utilities/store_event_specials.py | 2 +- plugins/utilities/tnt_respawn_text.py | 2 +- plugins/utilities/translate.py | 2 +- plugins/utilities/unlock_TowerD.py | 2 +- 22 files changed, 27 insertions(+), 21 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index fb8f993..dc9a378 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -400,6 +400,7 @@ } ], "versions": { + "1.3.0":null, "1.2.3": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -627,6 +628,7 @@ } ], "versions": { + "2.1.0": null, "2.0.2": { "api_version": 8, "commit_sha": "32e0f45", @@ -950,6 +952,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -1086,6 +1089,7 @@ } ], "versions": { + "1.1.0": null, "1.0.2": { "api_version": 8, "commit_sha": "95076d1", @@ -1142,6 +1146,7 @@ } ], "versions": { + "1.2.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", diff --git a/plugins/utilities/allow_invisible_models.py b/plugins/utilities/allow_invisible_models.py index 4f33761..ec8355f 100644 --- a/plugins/utilities/allow_invisible_models.py +++ b/plugins/utilities/allow_invisible_models.py @@ -1,5 +1,5 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 import babase import bascenev1 as bs diff --git a/plugins/utilities/autorun.py b/plugins/utilities/autorun.py index 9c36c78..fe710d9 100644 --- a/plugins/utilities/autorun.py +++ b/plugins/utilities/autorun.py @@ -1,5 +1,6 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 + +# ba_meta require api 9 """ AutoRun by TheMikirog diff --git a/plugins/utilities/bomb_radius_visualizer.py b/plugins/utilities/bomb_radius_visualizer.py index 8822961..0d69cf6 100644 --- a/plugins/utilities/bomb_radius_visualizer.py +++ b/plugins/utilities/bomb_radius_visualizer.py @@ -1,5 +1,5 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 """ Bomb Radius Visualizer by TheMikirog diff --git a/plugins/utilities/bots_can_accept_powerups.py b/plugins/utilities/bots_can_accept_powerups.py index ca7d842..a199f04 100644 --- a/plugins/utilities/bots_can_accept_powerups.py +++ b/plugins/utilities/bots_can_accept_powerups.py @@ -1,5 +1,5 @@ # Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 # (see https://ballistica.net/wiki/meta-tag-system) from __future__ import annotations diff --git a/plugins/utilities/character_chooser.py b/plugins/utilities/character_chooser.py index da12dbb..8488d54 100644 --- a/plugins/utilities/character_chooser.py +++ b/plugins/utilities/character_chooser.py @@ -1,4 +1,4 @@ -# ba_meta require api 8 +# ba_meta require api 9 ''' Character Chooser by Mr.Smoothy diff --git a/plugins/utilities/colorscheme.py b/plugins/utilities/colorscheme.py index a2998e3..0657c57 100644 --- a/plugins/utilities/colorscheme.py +++ b/plugins/utilities/colorscheme.py @@ -6,7 +6,7 @@ # Settings -> Advanced -> Enter Code # to bring up the colorscheme UI. -# ba_meta require api 8 +# ba_meta require api 9 import _babase import babase import bauiv1 as bui diff --git a/plugins/utilities/custom_death.py b/plugins/utilities/custom_death.py index bc8a66b..f6d23d2 100644 --- a/plugins/utilities/custom_death.py +++ b/plugins/utilities/custom_death.py @@ -1,5 +1,5 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 # (see https://ballistica.net/wiki/meta-tag-system) from __future__ import annotations diff --git a/plugins/utilities/discord_richpresence.py b/plugins/utilities/discord_richpresence.py index 0ae250a..323dc4c 100644 --- a/plugins/utilities/discord_richpresence.py +++ b/plugins/utilities/discord_richpresence.py @@ -2,7 +2,7 @@ # """placeholder :clown:""" -# ba_meta require api 8 +# ba_meta require api 9 #!"Made to you by @brostos & @Dliwk" diff --git a/plugins/utilities/file_share.py b/plugins/utilities/file_share.py index 4b9a546..709baad 100644 --- a/plugins/utilities/file_share.py +++ b/plugins/utilities/file_share.py @@ -1,4 +1,4 @@ -# ba_meta require api 8 +# ba_meta require api 9 ''' File Share Mod for BombSquad 1.7.30 and above. https://youtu.be/qtGsFU4cgic diff --git a/plugins/utilities/health_indicator.py b/plugins/utilities/health_indicator.py index 52d8f8b..ca08afe 100644 --- a/plugins/utilities/health_indicator.py +++ b/plugins/utilities/health_indicator.py @@ -14,7 +14,7 @@ For 1.7.20+""" # Add a simple health indicator on every player and bot. -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations diff --git a/plugins/utilities/icons_keyboard.py b/plugins/utilities/icons_keyboard.py index ff29a50..f42e1d6 100644 --- a/plugins/utilities/icons_keyboard.py +++ b/plugins/utilities/icons_keyboard.py @@ -7,7 +7,7 @@ # Tap bottom-left bomb button to cycle through different icons -# ba_meta require api 8 +# ba_meta require api 9 import bauiv1 import babase diff --git a/plugins/utilities/only_night.py b/plugins/utilities/only_night.py index b337647..873181d 100644 --- a/plugins/utilities/only_night.py +++ b/plugins/utilities/only_night.py @@ -2,7 +2,7 @@ # Tool used to make porting easier.(https://github.com/bombsquad-community/baport) """Only Night.""" -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations diff --git a/plugins/utilities/party_filter.py b/plugins/utilities/party_filter.py index 5670f95..e7114cf 100644 --- a/plugins/utilities/party_filter.py +++ b/plugins/utilities/party_filter.py @@ -214,7 +214,7 @@ class EnhancedPublicGatherTab(PublicGatherTab): self._parties_sorted = [p for p in self._parties_sorted if p[1].size == 0] -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export babase.Plugin class ByYelllow(babase.Plugin): def on_app_running(self) -> None: diff --git a/plugins/utilities/ragdoll_b_gone.py b/plugins/utilities/ragdoll_b_gone.py index 996160a..00958bd 100644 --- a/plugins/utilities/ragdoll_b_gone.py +++ b/plugins/utilities/ragdoll_b_gone.py @@ -1,5 +1,5 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 """ Ragdoll-B-Gone by TheMikirog diff --git a/plugins/utilities/random_join.py b/plugins/utilities/random_join.py index 6d37d89..81d654f 100644 --- a/plugins/utilities/random_join.py +++ b/plugins/utilities/random_join.py @@ -309,7 +309,7 @@ class RandomJoin: randomjoin = RandomJoin() -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export babase.Plugin class RandomJoinPlugin(babase.Plugin): def on_app_running(self) -> None: diff --git a/plugins/utilities/share_replay.py b/plugins/utilities/share_replay.py index 424a912..c0d214f 100644 --- a/plugins/utilities/share_replay.py +++ b/plugins/utilities/share_replay.py @@ -13,7 +13,7 @@ Message me in discord if you find some bug Use this code for your experiments or plugin but please dont rename this plugin and distribute with your name,don't do that,its bad' """ -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING, cast if TYPE_CHECKING: diff --git a/plugins/utilities/sorry.py b/plugins/utilities/sorry.py index fef0fe6..9c91cf4 100644 --- a/plugins/utilities/sorry.py +++ b/plugins/utilities/sorry.py @@ -59,7 +59,7 @@ class SorryPW(bauiv1lib.party.PartyWindow): for i in range(10, s._delay+1): bs.apptimer((i-10)/10, bs.Call(s._ok, i)) -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export plugin diff --git a/plugins/utilities/store_event_specials.py b/plugins/utilities/store_event_specials.py index 1e3f7ad..77cfe07 100644 --- a/plugins/utilities/store_event_specials.py +++ b/plugins/utilities/store_event_specials.py @@ -21,7 +21,7 @@ OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to """ -# ba_meta require api 8 +# ba_meta require api 9 from typing import List, Dict, Any diff --git a/plugins/utilities/tnt_respawn_text.py b/plugins/utilities/tnt_respawn_text.py index a15fab5..67f79be 100644 --- a/plugins/utilities/tnt_respawn_text.py +++ b/plugins/utilities/tnt_respawn_text.py @@ -1,5 +1,5 @@ # Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 """ TNT Respawn Text by TheMikirog diff --git a/plugins/utilities/translate.py b/plugins/utilities/translate.py index a304daa..46c7a35 100644 --- a/plugins/utilities/translate.py +++ b/plugins/utilities/translate.py @@ -246,7 +246,7 @@ class TranslateWindow: bui.getsound('swish').play() -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export plugin class byFreaku(babase.Plugin): def __init__(self): diff --git a/plugins/utilities/unlock_TowerD.py b/plugins/utilities/unlock_TowerD.py index 172e8c0..9406d0a 100644 --- a/plugins/utilities/unlock_TowerD.py +++ b/plugins/utilities/unlock_TowerD.py @@ -12,7 +12,7 @@ def new_play_types(cls): return ['melee', 'keep_away', 'team_flag', 'king_of_the_hill'] -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export plugin class byFreaku(babase.Plugin): def on_app_running(self): From 0ab9720dcd667bb5a35cc6a951c328fd3a7b85ba Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 03:16:41 +0530 Subject: [PATCH 05/84] ehh --- plugins/utilities.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/utilities.json b/plugins/utilities.json index dc9a378..5c300c0 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -33,6 +33,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "667397e", @@ -128,6 +129,7 @@ } ], "versions": { + "2.1.0": null, "2.0.0": { "api_version": 8, "commit_sha": "333416f", @@ -147,6 +149,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "fcda5f0", @@ -171,6 +174,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -215,6 +219,7 @@ } ], "versions": { + "1.4.0": null, "1.3.2": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -270,6 +275,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -449,6 +455,7 @@ } ], "versions": { + "2.2.0": null, "2.1.0": { "api_version": 8, "commit_sha": "464eb7c", @@ -504,6 +511,7 @@ } ], "versions": { + "2.1.0": null, "2.0.0": { "api_version": 8, "commit_sha": "c41cc10", @@ -529,6 +537,7 @@ } ], "versions": { + "2.1.0": null, "2.0.0": { "api_version": 8, "commit_sha": "48f9302", @@ -697,6 +706,7 @@ } ], "versions": { + "1.1.0": null, "1.0.2": { "api_version": 8, "commit_sha": "505c948", @@ -759,6 +769,7 @@ } ], "versions": { + "2.1.0": null, "2.0.0": { "api_version": 8, "commit_sha": "0c5ce76", @@ -821,6 +832,7 @@ } ], "versions": { + "3.1.0": null, "3.0.1": { "api_version": 8, "commit_sha": "78f3c44", @@ -927,6 +939,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -1070,6 +1083,7 @@ } ], "versions": { + "1.3.0": null, "1.2.0": { "api_version": 8, "commit_sha": "41046ae", @@ -1121,6 +1135,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -1228,6 +1243,7 @@ } ], "versions": { + "1.5.0": null, "1.4.3": { "api_version": 8, "commit_sha": "f50a546", @@ -1327,6 +1343,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "718039b", @@ -1384,6 +1401,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "4941d0c", From bb129cc6f3dae5ba9664f4f8fc1670b51ca8d659 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 21:49:07 +0000 Subject: [PATCH 06/84] [ci] auto-format --- plugin_manager.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index c5e8c42..84496ce 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1694,8 +1694,8 @@ class PluginManagerWindow(bui.MainWindow): size=(self._width, self._height + top_extra), toolbar_visibility="menu_minimal", scale=(1.9 if _uiscale is babase.UIScale.SMALL - else 1.5 if _uiscale is babase.UIScale.MEDIUM - else 1.0), + else 1.5 if _uiscale is babase.UIScale.MEDIUM + else 1.0), stack_offset=(0, -25) if _uiscale is babase.UIScale.SMALL else (0, 0) ), transition=transition, @@ -1706,7 +1706,7 @@ class PluginManagerWindow(bui.MainWindow): 27 if _uiscale is babase.UIScale.MEDIUM else 68) back_pos_y = self._height - (95 if _uiscale is babase.UIScale.SMALL else 65 if _uiscale is babase.UIScale.MEDIUM else 50) - + if _uiscale is bui.UIScale.SMALL: self._back_button = None bui.containerwidget( @@ -1765,7 +1765,8 @@ class PluginManagerWindow(bui.MainWindow): edit=self._plugin_manager_status_text, text="Make sure you are connected\n to the Internet and try again." ) - except: pass + except: + pass self.plugin_manager._index_setup_in_progress = False except RuntimeError: # User probably went back before a bui.Window could finish loading. @@ -1774,7 +1775,8 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text=str(e)) - except: pass + except: + pass raise def _update_dots(self): @@ -1798,7 +1800,8 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text="") - except: pass + except: + pass await self.select_category("All") def draw_plugins_scroll_bar(self): @@ -2113,7 +2116,8 @@ class PluginManagerWindow(bui.MainWindow): self.cleanup() try: bui.textwidget(edit=self._plugin_manager_status_text, text="Refreshing") - except: pass + except: + pass if self._dot_timer is None: self._dot_timer = babase.AppTimer(0.5, self._update_dots, repeat=True) @@ -2124,7 +2128,8 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text="") - except: pass + except: + pass await self.select_category(self.selected_category) def soft_refresh(self): @@ -2383,7 +2388,7 @@ class NewAllSettingsWindow(AllSettingsWindow): for child in self._root_widget.get_children(): child.delete() - + bui.containerwidget( edit=self._root_widget, size=(width, height + top_extra) ) From 7b9362ab86b29948c72a5e8c09c1cbdd34acbe60 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 21:49:08 +0000 Subject: [PATCH 07/84] [ci] apply-version-metadata --- plugins/utilities.json | 161 +++++++++++++++++++++++++++++++++++------ 1 file changed, 138 insertions(+), 23 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 5c300c0..9447bf7 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -33,7 +33,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "f5b3db1774924f90381e3e4abb7b6278" + }, "1.0.0": { "api_version": 8, "commit_sha": "667397e", @@ -129,7 +134,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "1b41b40775ed6fd98a2e3a4c4de4778e" + }, "2.0.0": { "api_version": 8, "commit_sha": "333416f", @@ -149,7 +159,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "da4f281188f46d0c8e518c57c17144d4" + }, "1.0.0": { "api_version": 8, "commit_sha": "fcda5f0", @@ -174,7 +189,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "2d12dd560558b87f3f1fd6f134f397b8" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -219,7 +239,12 @@ } ], "versions": { - "1.4.0": null, + "1.4.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "80a8469d7340e59b5c7754a2b5c48ccd" + }, "1.3.2": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -275,7 +300,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "04a6d85404f51b3026060d9525c14b09" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -406,7 +436,12 @@ } ], "versions": { - "1.3.0":null, + "1.3.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "499ccd84ac8deedef5596dccad2a58b7" + }, "1.2.3": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -455,7 +490,12 @@ } ], "versions": { - "2.2.0": null, + "2.2.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "ce3ed59ed6009ced568b94105c10ae42" + }, "2.1.0": { "api_version": 8, "commit_sha": "464eb7c", @@ -511,7 +551,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "48896fb8a1ecfdb1ce382b06db315854" + }, "2.0.0": { "api_version": 8, "commit_sha": "c41cc10", @@ -537,7 +582,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "02857d12efabced28a6d980756143aeb" + }, "2.0.0": { "api_version": 8, "commit_sha": "48f9302", @@ -637,7 +687,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "2929a3af42ee3547864878a77a4c66a1" + }, "2.0.2": { "api_version": 8, "commit_sha": "32e0f45", @@ -706,7 +761,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "cb06090af5beb9f80965342b9a83b1e9" + }, "1.0.2": { "api_version": 8, "commit_sha": "505c948", @@ -769,7 +829,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "56d3b51b5929a53a7d2de04326ea7bae" + }, "2.0.0": { "api_version": 8, "commit_sha": "0c5ce76", @@ -832,7 +897,12 @@ } ], "versions": { - "3.1.0": null, + "3.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "d94cc8a8a6cef495a6e09d019ebe3eb9" + }, "3.0.1": { "api_version": 8, "commit_sha": "78f3c44", @@ -939,7 +1009,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "90aaf343cf22eb024665ec5a7a4889c0" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -965,7 +1040,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "4281fd65d90f314d3c8180505856a9d3" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -1083,7 +1163,12 @@ } ], "versions": { - "1.3.0": null, + "1.3.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "e9b9817c356101038e4f3b522311c4a6" + }, "1.2.0": { "api_version": 8, "commit_sha": "41046ae", @@ -1103,7 +1188,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "f269311e8c321f912940c8127e4c6c29" + }, "1.0.2": { "api_version": 8, "commit_sha": "95076d1", @@ -1135,7 +1225,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "b33c016195bc17c3ebd878570c9e3fa6" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -1161,7 +1256,12 @@ } ], "versions": { - "1.2.0": null, + "1.2.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "96815ba9a784ca0004ce6580eedd9b57" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", @@ -1243,7 +1343,12 @@ } ], "versions": { - "1.5.0": null, + "1.5.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "af4ec55092fb22d2799d63e19c599464" + }, "1.4.3": { "api_version": 8, "commit_sha": "f50a546", @@ -1343,7 +1448,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "4cd035b88234f5f082c706d5eb37bd28" + }, "1.0.0": { "api_version": 8, "commit_sha": "718039b", @@ -1401,7 +1511,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bb129cc", + "released_on": "14-01-2025", + "md5sum": "50e9c3ea8d7e7de5cd491987547c9cf3" + }, "1.0.0": { "api_version": 8, "commit_sha": "4941d0c", From 6e452b0eda171b3d326891b2a3876e4f5e407297 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 03:24:12 +0530 Subject: [PATCH 08/84] version bump --- index.json | 1 + 1 file changed, 1 insertion(+) diff --git a/index.json b/index.json index 5a20bca..d75db19 100644 --- a/index.json +++ b/index.json @@ -1,6 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { + "1.1.0": null, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", From 9098621709bb4055073ad8cf0ac514d12cea67ef Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 21:54:46 +0000 Subject: [PATCH 09/84] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index d75db19..97bb8cd 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "6e452b0", + "released_on": "14-01-2025", + "md5sum": "63f4441785e3ab6951e0e192faab6cec" + }, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", From b12a738dbe584f549adb62f6ba4350b23dc1fc9a Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 03:28:06 +0530 Subject: [PATCH 10/84] woops --- plugin_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_manager.py b/plugin_manager.py index 84496ce..e66c1e1 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -29,7 +29,7 @@ from typing import cast, override # Modules used for overriding AllSettingsWindow import logging -PLUGIN_MANAGER_VERSION = "1.0.23" +PLUGIN_MANAGER_VERSION = "1.1.0" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. From 5f3a701ebcd341e831835b4246441d9412b52d8c Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 03:29:13 +0530 Subject: [PATCH 11/84] ;-; --- index.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.json b/index.json index 97bb8cd..d75db19 100644 --- a/index.json +++ b/index.json @@ -1,12 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": { - "api_version": 9, - "commit_sha": "6e452b0", - "released_on": "14-01-2025", - "md5sum": "63f4441785e3ab6951e0e192faab6cec" - }, + "1.1.0": null, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", From 4d9d7e483afb1df913bdce569d156aa536f6057c Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 21:59:41 +0000 Subject: [PATCH 12/84] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index d75db19..01543a7 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "5f3a701", + "released_on": "14-01-2025", + "md5sum": "7b41cb16266963a128e3c556396d2ea1" + }, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", From 0fd23a50637835ce91db2b80c253ae73115f588c Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 03:34:15 +0530 Subject: [PATCH 13/84] god have mercy --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ef953..a4a5af8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Plugin Manager (dd-mm-yyyy) +### 1.1.0 (15-01-2025) + +- Updating to bombsquad api 9. + ### 1.0.23 (13-01-2025) - Fixed a bug which wasn't letting older versions run Plugin Manager. From 9c1ff8b0f28a0cea9b1b631710f31fb76e872daa Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 04:15:39 +0530 Subject: [PATCH 14/84] Updated ci and release workflow --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 10 ++++++---- CHANGELOG.md | 2 +- test/get_latest.py | 15 ++++++++++++--- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2816e52..24c639d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 429aa3a..9cfbbd7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: 'Get Previous tag' uses: oprypin/find-latest-tag@v1.1.2 @@ -27,14 +27,16 @@ jobs: - name: set_variables run: | - output1=$(python3 test/get_latest.py) + output1=$(python3 test/get_latest.py get_latest_version) { echo "changelog<> "$GITHUB_OUTPUT" + output2=$(python3 test/get_latest.py get_latest_api) output3=$(python3 test/version_is_lower.py ${{ steps.previoustag.outputs.tag }}) echo "latestVersion=$output1" >> $GITHUB_OUTPUT + echo "latestAPI=$output2" >> $GITHUB_OUTPUT echo "shouldRun=$output3" >> $GITHUB_OUTPUT id: set_variables @@ -54,7 +56,7 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }} - name: Release ${{ steps.tag_version.outputs.new_tag }} + name: ${{ steps.tag_version.outputs.new_tag }} (api ${{ steps.set_variables.outputs.latestAPI }}) artifacts: "plugin_manager.py" body: | ## Changelog diff --git a/CHANGELOG.md b/CHANGELOG.md index a4a5af8..d4719d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### 1.1.0 (15-01-2025) -- Updating to bombsquad api 9. +- Updated to bombsquad api 9. ### 1.0.23 (13-01-2025) diff --git a/test/get_latest.py b/test/get_latest.py index 0439068..b3921b9 100644 --- a/test/get_latest.py +++ b/test/get_latest.py @@ -1,13 +1,22 @@ import json +import sys - -def get_latest(): +def get_latest_version(): """Get latest version entry from index.json""" with open('index.json', 'r') as file: content = json.loads(file.read()) latest_version = list(content["versions"].keys())[0] return latest_version +def get_latest_api(): + """Get latest api entry from index.json""" + with open('index.json', 'r') as file: + content = json.loads(file.read()) + latest_api = content["versions"][get_latest_version()]["api_version"] + return latest_api if __name__ == "__main__": - print(get_latest()) + if len(sys.argv) < 2: + print(f"Usage: python3 {__file__.split('/')[-1]} function") + sys.exit(1) + print(globals()[sys.argv[1]]()) # used to call the fucntion passed as cli parameter \ No newline at end of file From 9b1f5b6a63c3e376893e105ec81ebec515354ade Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 22:46:36 +0000 Subject: [PATCH 15/84] [ci] auto-format --- test/get_latest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/get_latest.py b/test/get_latest.py index b3921b9..3dde5db 100644 --- a/test/get_latest.py +++ b/test/get_latest.py @@ -1,6 +1,7 @@ import json import sys + def get_latest_version(): """Get latest version entry from index.json""" with open('index.json', 'r') as file: @@ -8,6 +9,7 @@ def get_latest_version(): latest_version = list(content["versions"].keys())[0] return latest_version + def get_latest_api(): """Get latest api entry from index.json""" with open('index.json', 'r') as file: @@ -15,8 +17,9 @@ def get_latest_api(): latest_api = content["versions"][get_latest_version()]["api_version"] return latest_api + if __name__ == "__main__": if len(sys.argv) < 2: print(f"Usage: python3 {__file__.split('/')[-1]} function") sys.exit(1) - print(globals()[sys.argv[1]]()) # used to call the fucntion passed as cli parameter \ No newline at end of file + print(globals()[sys.argv[1]]()) # used to call the fucntion passed as cli parameter From 68e2fc481cd21d64ea55b4b9ece26772fa1fa351 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 04:25:43 +0530 Subject: [PATCH 16/84] fix --- test/version_is_lower.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/version_is_lower.py b/test/version_is_lower.py index 6f65b52..8b6f429 100644 --- a/test/version_is_lower.py +++ b/test/version_is_lower.py @@ -1,5 +1,5 @@ import sys -from get_latest import get_latest +from get_latest import get_latest_version def semantic_to_str(semantic_version: str): @@ -16,7 +16,7 @@ def semantic_to_str(semantic_version: str): def version_is_lower(version: str): """Check if given version is lower than the latest entry in index.json""" - latest = semantic_to_str(get_latest()) + latest = semantic_to_str(get_latest_version()) version = semantic_to_str(version) if latest > version: return True From 26c05732f7d0f17b8ad0c22a6094041dcee14e4a Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Wed, 15 Jan 2025 04:30:09 +0530 Subject: [PATCH 17/84] test --- index.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/index.json b/index.json index 01543a7..512a8b3 100644 --- a/index.json +++ b/index.json @@ -1,12 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": { - "api_version": 9, - "commit_sha": "5f3a701", - "released_on": "14-01-2025", - "md5sum": "7b41cb16266963a128e3c556396d2ea1" - }, + "1.1.0": null, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", @@ -254,4 +249,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} From f13cdafffc27554e7e6034aa0e7dfaefc321004b Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 14 Jan 2025 23:00:37 +0000 Subject: [PATCH 18/84] [ci] apply-version-metadata --- index.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.json b/index.json index 512a8b3..c0fb1d2 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "26c0573", + "released_on": "14-01-2025", + "md5sum": "7b41cb16266963a128e3c556396d2ea1" + }, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", @@ -249,4 +254,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file From ccf78e7ad0ed2347d04ce2c056f1d85803ff90fa Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 20:33:50 +0530 Subject: [PATCH 19/84] um small change (version bump can be done in the end) --- plugin_manager.py | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index e66c1e1..dfb3855 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -23,13 +23,13 @@ import pathlib import hashlib import contextlib +from typing import cast from datetime import datetime -from typing import cast, override # Modules used for overriding AllSettingsWindow import logging -PLUGIN_MANAGER_VERSION = "1.1.0" +PLUGIN_MANAGER_VERSION = "1.0.23" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. @@ -37,6 +37,7 @@ CURRENT_TAG = "main" _env = _babase.env() _uiscale = bui.app.ui_v1.uiscale +_app_api_version = babase.app.env.api_version INDEX_META = "{repository_url}/{content_type}/{tag}/index.json" CHANGELOG_META = "{repository_url}/{content_type}/{tag}/CHANGELOG.md" @@ -786,7 +787,7 @@ class Plugin: def latest_compatible_version(self): if self._latest_compatible_version is None: for number, info in self.info["versions"].items(): - if info["api_version"] == babase.app.env.api_version: + if info["api_version"] == _app_api_version: self._latest_compatible_version = PluginVersion( self, (number, info), @@ -795,7 +796,7 @@ class Plugin: break if self._latest_compatible_version is None: raise NoCompatibleVersion( - f"{self.name} has no version compatible with API {babase.app.env.api_version}." + f"{self.name} has no version compatible with API {_app_api_version}." ) return self._latest_compatible_version @@ -1427,7 +1428,7 @@ class PluginManager: async def get_update_details(self): index = await self.get_index() for version, info in index["versions"].items(): - if info["api_version"] != babase.app.env.api_version: + if info["api_version"] != _app_api_version: # No point checking a version of the API game doesn't support. continue if version == PLUGIN_MANAGER_VERSION: @@ -1765,8 +1766,7 @@ class PluginManagerWindow(bui.MainWindow): edit=self._plugin_manager_status_text, text="Make sure you are connected\n to the Internet and try again." ) - except: - pass + except: pass self.plugin_manager._index_setup_in_progress = False except RuntimeError: # User probably went back before a bui.Window could finish loading. @@ -1775,8 +1775,7 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text=str(e)) - except: - pass + except: pass raise def _update_dots(self): @@ -1785,8 +1784,7 @@ class PluginManagerWindow(bui.MainWindow): if text.endswith('....'): text = text[0:len(text)-4] bui.textwidget(edit=self._plugin_manager_status_text, text=(text + '.')) - except: - pass + except: pass async def draw_index(self): self.draw_search_bar() @@ -1800,8 +1798,7 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text="") - except: - pass + except: pass await self.select_category("All") def draw_plugins_scroll_bar(self): @@ -2116,8 +2113,7 @@ class PluginManagerWindow(bui.MainWindow): self.cleanup() try: bui.textwidget(edit=self._plugin_manager_status_text, text="Refreshing") - except: - pass + except: pass if self._dot_timer is None: self._dot_timer = babase.AppTimer(0.5, self._update_dots, repeat=True) @@ -2128,8 +2124,7 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text="") - except: - pass + except: pass await self.select_category(self.selected_category) def soft_refresh(self): @@ -2327,7 +2322,7 @@ class PluginManagerSettingsWindow(popup.PopupWindow): size=(0, 0), h_align='center', v_align='center', - text=f'API Version: {babase.app.env.api_version}', + text=f'API Version: {_app_api_version}', scale=text_scale * 0.7, color=(0.4, 0.8, 1), maxwidth=width * 0.95) From 95e6ad816a6487591dbdbff46c687fcd83367384 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 15:04:16 +0000 Subject: [PATCH 20/84] [ci] auto-format --- plugin_manager.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index dfb3855..41b2a26 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1766,7 +1766,8 @@ class PluginManagerWindow(bui.MainWindow): edit=self._plugin_manager_status_text, text="Make sure you are connected\n to the Internet and try again." ) - except: pass + except: + pass self.plugin_manager._index_setup_in_progress = False except RuntimeError: # User probably went back before a bui.Window could finish loading. @@ -1775,7 +1776,8 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text=str(e)) - except: pass + except: + pass raise def _update_dots(self): @@ -1784,7 +1786,8 @@ class PluginManagerWindow(bui.MainWindow): if text.endswith('....'): text = text[0:len(text)-4] bui.textwidget(edit=self._plugin_manager_status_text, text=(text + '.')) - except: pass + except: + pass async def draw_index(self): self.draw_search_bar() @@ -1798,7 +1801,8 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text="") - except: pass + except: + pass await self.select_category("All") def draw_plugins_scroll_bar(self): @@ -2113,7 +2117,8 @@ class PluginManagerWindow(bui.MainWindow): self.cleanup() try: bui.textwidget(edit=self._plugin_manager_status_text, text="Refreshing") - except: pass + except: + pass if self._dot_timer is None: self._dot_timer = babase.AppTimer(0.5, self._update_dots, repeat=True) @@ -2124,7 +2129,8 @@ class PluginManagerWindow(bui.MainWindow): self._dot_timer = None try: bui.textwidget(edit=self._plugin_manager_status_text, text="") - except: pass + except: + pass await self.select_category(self.selected_category) def soft_refresh(self): From 944ae6d8f47d9cacc3a288b98c8e1a08e12e138d Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 20:36:44 +0530 Subject: [PATCH 21/84] Bumping version back up :/ --- plugin_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_manager.py b/plugin_manager.py index 41b2a26..17ecb74 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -29,7 +29,7 @@ from datetime import datetime # Modules used for overriding AllSettingsWindow import logging -PLUGIN_MANAGER_VERSION = "1.0.23" +PLUGIN_MANAGER_VERSION = "1.1.0" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. From 4b39a24273f8b0ad57a2ff19a3f9b039e3668f96 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 20:39:35 +0530 Subject: [PATCH 22/84] check --- index.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.json b/index.json index c0fb1d2..d75db19 100644 --- a/index.json +++ b/index.json @@ -1,12 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": { - "api_version": 9, - "commit_sha": "26c0573", - "released_on": "14-01-2025", - "md5sum": "7b41cb16266963a128e3c556396d2ea1" - }, + "1.1.0": null, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", From 27a116fb92efaee13afc9feceaa73e0e7a1c3d6c Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 15:09:59 +0000 Subject: [PATCH 23/84] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index d75db19..8093895 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "4b39a24", + "released_on": "21-01-2025", + "md5sum": "d58551313ae91498c0b0ba804df1066e" + }, "1.0.23": { "api_version": 8, "commit_sha": "1d6a41f", From 37914bb401bf31ef0a56a8315272afa2801cdc32 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 21:00:10 +0530 Subject: [PATCH 24/84] Updating colored_bomb_explosion_patches to api 9 --- plugins/utilities.json | 1 + .../colored_bomb_explosion_patches.py | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 9447bf7..645b298 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -381,6 +381,7 @@ } ], "versions": { + "1.0.2": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", diff --git a/plugins/utilities/colored_bomb_explosion_patches.py b/plugins/utilities/colored_bomb_explosion_patches.py index 813989e..6a756c1 100644 --- a/plugins/utilities/colored_bomb_explosion_patches.py +++ b/plugins/utilities/colored_bomb_explosion_patches.py @@ -1,13 +1,10 @@ -# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 -# (see https://ballistica.net/wiki/meta-tag-system) +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING import babase -import bauiv1 as bui import bascenev1 as bs import random from bascenev1lib.actor import bomb @@ -19,6 +16,7 @@ if TYPE_CHECKING: class NewBlast(bomb.Blast): def __init__( self, + *, position: Sequence[float] = (0.0, 1.0, 0.0), velocity: Sequence[float] = (0.0, 0.0, 0.0), blast_radius: float = 2.0, @@ -27,9 +25,16 @@ class NewBlast(bomb.Blast): hit_type: str = 'explosion', hit_subtype: str = 'normal', ): - super().__init__(position, velocity, blast_radius, blast_type, - source_player, hit_type, hit_subtype) - scorch_radius = light_radius = self.radius + super().__init__( + position=position, + velocity=velocity, + blast_radius=blast_radius, + blast_type=blast_type, + source_player=source_player, + hit_type=hit_type, + hit_subtype=hit_subtype + ) + scorch_radius = self.radius if self.blast_type == 'tnt': scorch_radius *= 1.15 scorch = bs.newnode( From d27ce0e4545d0b084d486cd5ee342e9a4f2d7cc3 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 15:30:36 +0000 Subject: [PATCH 25/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 645b298..dc4827b 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -381,7 +381,12 @@ } ], "versions": { - "1.0.2": null, + "1.0.2": { + "api_version": 9, + "commit_sha": "37914bb", + "released_on": "21-01-2025", + "md5sum": "c1f8a382f0f64777b5415c82d6913ff2" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", From 0b1f49b90bd292a5b0258dad65852f4bfd9f7965 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 21:12:38 +0530 Subject: [PATCH 26/84] Updating disable_friendly_fire to api 9 --- plugins/utilities.json | 1 + plugins/utilities/disable_friendly_fire.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index dc4827b..5650e46 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1416,6 +1416,7 @@ } ], "versions": { + "1.0.1": null, "1.0.0": { "api_version": 8, "commit_sha": "f744c41", diff --git a/plugins/utilities/disable_friendly_fire.py b/plugins/utilities/disable_friendly_fire.py index e8bf84e..5b7da81 100644 --- a/plugins/utilities/disable_friendly_fire.py +++ b/plugins/utilities/disable_friendly_fire.py @@ -1,10 +1,8 @@ -# Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING import babase -import bauiv1 as bui import bascenev1 as bs import bascenev1lib from bascenev1lib.gameutils import SharedObjects @@ -21,8 +19,6 @@ class BombPickupMessage: freeze: bool = True # ba_meta export plugin - - class Plugin(babase.Plugin): # there are two ways to ignore our team player hits From ea6494079dfc566893591bdc25ff5ba5a0a4a90a Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 15:43:03 +0000 Subject: [PATCH 27/84] [ci] auto-format --- plugins/utilities/disable_friendly_fire.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/utilities/disable_friendly_fire.py b/plugins/utilities/disable_friendly_fire.py index 5b7da81..699c40e 100644 --- a/plugins/utilities/disable_friendly_fire.py +++ b/plugins/utilities/disable_friendly_fire.py @@ -19,6 +19,8 @@ class BombPickupMessage: freeze: bool = True # ba_meta export plugin + + class Plugin(babase.Plugin): # there are two ways to ignore our team player hits From ee278047ed43417ef545171baadc6abec0dbe2e2 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 15:43:04 +0000 Subject: [PATCH 28/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 5650e46..276c996 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1416,7 +1416,12 @@ } ], "versions": { - "1.0.1": null, + "1.0.1": { + "api_version": 9, + "commit_sha": "ea64940", + "released_on": "21-01-2025", + "md5sum": "9742d478095ac72b1780b75c17ebeb07" + }, "1.0.0": { "api_version": 8, "commit_sha": "f744c41", From 04b8460dab2b56992ecfe8c51e7739c843efcf10 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 21:20:46 +0530 Subject: [PATCH 29/84] Updating disco_light to api 9 --- plugins/utilities.json | 1 + plugins/utilities/disco_light.py | 22 ++-------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 276c996..2cad632 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1077,6 +1077,7 @@ } ], "versions": { + "2.2.0": null, "2.1.0": { "api_version": 8, "commit_sha": "41046ae", diff --git a/plugins/utilities/disco_light.py b/plugins/utilities/disco_light.py index fc03d80..b517d73 100644 --- a/plugins/utilities/disco_light.py +++ b/plugins/utilities/disco_light.py @@ -18,7 +18,7 @@ Made by Cross Joy""" # Coop and multiplayer compatible. -# Work on any 1.7.20+ ver. +# Work on any 1.7.37+ ver. # Note: # The plugin commands only works on the host with the plugin activated. @@ -30,24 +30,18 @@ Made by Cross Joy""" # ---------------------------------------------------------------------------- -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations -from typing import TYPE_CHECKING - import bascenev1 as bs import babase -import bauiv1 as bui from bascenev1 import _gameutils import random from bascenev1 import animate -if TYPE_CHECKING: - from typing import Sequence, Union - class DiscoLight: @@ -213,20 +207,8 @@ def new_chat_message(func): return wrapper -def new_begin(func): - """Runs when game is began.""" - - def wrapper(*args, **kwargs): - func(*args, **kwargs) - bui.set_party_icon_always_visible(True) - - return wrapper - - # ba_meta export plugin class ByCrossJoy(babase.Plugin): def __init__(self): # Replace new chat func to the original game codes. bs.chatmessage = new_chat_message(bs.chatmessage) - bs._activity.Activity.on_begin = new_begin( - bs._activity.Activity.on_begin) From 94c4be4c3d8a9f5ed81c9d6efea86ad0ed204ed1 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 15:51:13 +0000 Subject: [PATCH 30/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 2cad632..d7e8b12 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1077,7 +1077,12 @@ } ], "versions": { - "2.2.0": null, + "2.2.0": { + "api_version": 9, + "commit_sha": "04b8460", + "released_on": "21-01-2025", + "md5sum": "2c78b1e3918053fa94d709571fef624d" + }, "2.1.0": { "api_version": 8, "commit_sha": "41046ae", From 69c71815c9de48de4307fc2806f4a16e03d2bfa6 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 21:36:35 +0530 Subject: [PATCH 31/84] Updating floater.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/floater.py | 33 +++------------------------------ 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index d7e8b12..ec8aaff 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -619,6 +619,7 @@ } ], "versions": { + "2.0.2": null, "2.0.1": { "api_version": 8, "commit_sha": "1d45e69", diff --git a/plugins/utilities/floater.py b/plugins/utilities/floater.py index 0f0ec64..d3f1a86 100644 --- a/plugins/utilities/floater.py +++ b/plugins/utilities/floater.py @@ -8,10 +8,8 @@ # https://github.com/Freaku17/BombSquad-Mods-byFreaku -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations -from typing import TYPE_CHECKING -import _babase import babase import random import math @@ -20,10 +18,6 @@ import bascenev1 as bs from bascenev1lib.gameutils import SharedObjects from bascenev1lib.actor.bomb import Bomb from bascenev1lib.actor.popuptext import PopupText -from bauiv1lib.party import PartyWindow -import bauiv1lib.mainmenu -if TYPE_CHECKING: - from typing import Optional class Floater(bs.Actor): @@ -253,26 +247,15 @@ def assignFloInputs(clientID: int): i.assigninput(babase.InputType.PICK_UP_PRESS, floater.up) i.assigninput(babase.InputType.PICK_UP_RELEASE, floater.upR) i.assigninput(babase.InputType.JUMP_PRESS, floater.down) + i.assigninput(babase.InputType.JUMP_RELEASE, floater.downR) i.assigninput(babase.InputType.BOMB_PRESS, floater.drop) i.assigninput(babase.InputType.PUNCH_PRESS, babase.Call(dis, i, floater)) i.assigninput(babase.InputType.UP_DOWN, floater.updown) i.assigninput(babase.InputType.LEFT_RIGHT, floater.leftright) -old_piv = bui.set_party_icon_always_visible - - -def new_piv(*args, **kwargs): - # Do not let chat icon go away - old_piv(True) - - -bui.set_party_icon_always_visible = new_piv - - old_fcm = bs.chatmessage - def new_chat_message(*args, **kwargs): old_fcm(*args, **kwargs) if args[0] == '/floater': @@ -281,18 +264,8 @@ def new_chat_message(*args, **kwargs): except: pass - bs.chatmessage = new_chat_message - -class NewMainMenuWindow(bauiv1lib.mainmenu.MainMenuWindow): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - # Display chat icon, but if user open/close gather it may disappear - bui.set_party_icon_always_visible(True) - - # ba_meta export plugin class byFreaku(babase.Plugin): - def on_app_running(self): - bauiv1lib.mainmenu.MainMenuWindow = NewMainMenuWindow + def on_app_running(self): pass From 2c66eac55b91db870a16210a967761f6b409eaad Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 16:07:00 +0000 Subject: [PATCH 32/84] [ci] auto-format --- plugins/utilities/floater.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/utilities/floater.py b/plugins/utilities/floater.py index d3f1a86..bbd9a89 100644 --- a/plugins/utilities/floater.py +++ b/plugins/utilities/floater.py @@ -256,6 +256,7 @@ def assignFloInputs(clientID: int): old_fcm = bs.chatmessage + def new_chat_message(*args, **kwargs): old_fcm(*args, **kwargs) if args[0] == '/floater': @@ -264,8 +265,11 @@ def new_chat_message(*args, **kwargs): except: pass + bs.chatmessage = new_chat_message # ba_meta export plugin + + class byFreaku(babase.Plugin): def on_app_running(self): pass From 0d46d483d537cc970419147bc29e3a4814d3b8d6 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 16:07:04 +0000 Subject: [PATCH 33/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index ec8aaff..c50c675 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -619,7 +619,12 @@ } ], "versions": { - "2.0.2": null, + "2.0.2": { + "api_version": 9, + "commit_sha": "2c66eac", + "released_on": "21-01-2025", + "md5sum": "37a68c15b66a2deca923317db9d4c630" + }, "2.0.1": { "api_version": 8, "commit_sha": "1d45e69", From 85193fe6911daff02d3c32afb70f1ffa1e5c668f Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 21:43:24 +0530 Subject: [PATCH 34/84] Updating infinity_shield.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/infinity_shield.py | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index c50c675..dc9cbf9 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1453,6 +1453,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "718039b", diff --git a/plugins/utilities/infinity_shield.py b/plugins/utilities/infinity_shield.py index 9510452..03dfa08 100644 --- a/plugins/utilities/infinity_shield.py +++ b/plugins/utilities/infinity_shield.py @@ -1,18 +1,18 @@ -# Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 -# (see https://ballistica.net/wiki/meta-tag-system) +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING import babase -import bauiv1 as bui import bascenev1 as bs import random from bascenev1lib.actor.spaz import Spaz from bascenev1lib.actor.spazfactory import SpazFactory +if TYPE_CHECKING: + from typing import Sequence + if TYPE_CHECKING: pass @@ -21,6 +21,7 @@ Spaz._old_init = Spaz.__init__ def __init__(self, + *, color: Sequence[float] = (1.0, 1.0, 1.0), highlight: Sequence[float] = (0.5, 0.5, 0.5), character: str = 'Spaz', @@ -29,8 +30,16 @@ def __init__(self, can_accept_powerups: bool = True, powerups_expire: bool = False, demo_mode: bool = False): - self._old_init(color, highlight, character, source_player, start_invincible, - can_accept_powerups, powerups_expire, demo_mode) + self._old_init( + color=color, + highlight=highlight, + character=character, + source_player=source_player, + start_invincible=start_invincible, + can_accept_powerups=can_accept_powerups, + powerups_expire=powerups_expire, + demo_mode=demo_mode + ) if self.source_player: self.equip_shields() From b5200939178ac3f8f80d070cc6641aa8e8aa3aac Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 16:13:50 +0000 Subject: [PATCH 35/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index dc9cbf9..cfb7fd1 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1453,7 +1453,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "85193fe", + "released_on": "21-01-2025", + "md5sum": "03d98165e14886fba7f139f8610686f7" + }, "1.0.0": { "api_version": 8, "commit_sha": "718039b", From 1b190ff3a49b2906c6790916e8790fa190258ab3 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 22:01:28 +0530 Subject: [PATCH 36/84] Updating max_players.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/max_players.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index cfb7fd1..a9f0886 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -331,6 +331,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", diff --git a/plugins/utilities/max_players.py b/plugins/utilities/max_players.py index 39d0672..d1c2da2 100644 --- a/plugins/utilities/max_players.py +++ b/plugins/utilities/max_players.py @@ -1,8 +1,6 @@ -# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) """===========MAX_PLAYERS===========""" -# ba_meta require api 8 -# (see https://ballistica.net/wiki/meta-tag-system) +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING @@ -369,4 +367,4 @@ class MaxPlayersPlugin(babase.Plugin): MultiTeamSession.get_max_players = get_max_players GatherWindow.__init__ = __gather_init__ GatherWindow._save_state = _save_state - GatherWindow._restore_state = _restore_state + GatherWindow._restore_state = _restore_state \ No newline at end of file From b52d84a407e3dfe74837d23cb0d7be209b6942c9 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 16:31:53 +0000 Subject: [PATCH 37/84] [ci] auto-format --- plugins/utilities/max_players.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/max_players.py b/plugins/utilities/max_players.py index d1c2da2..d75477f 100644 --- a/plugins/utilities/max_players.py +++ b/plugins/utilities/max_players.py @@ -367,4 +367,4 @@ class MaxPlayersPlugin(babase.Plugin): MultiTeamSession.get_max_players = get_max_players GatherWindow.__init__ = __gather_init__ GatherWindow._save_state = _save_state - GatherWindow._restore_state = _restore_state \ No newline at end of file + GatherWindow._restore_state = _restore_state From 806b9d05fad8c47c4429baf2b75ac4660f6395c0 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 16:31:54 +0000 Subject: [PATCH 38/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index a9f0886..6068921 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -331,7 +331,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "b52d84a", + "released_on": "21-01-2025", + "md5sum": "cc2d3d06a20f4c9de3f3fa3d7eccf46c" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", From 43b3a41f9ab3ea07165f8327cac7feda0350c1c8 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 22:31:30 +0530 Subject: [PATCH 39/84] Updating quickturn.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/quickturn.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 6068921..c9da644 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1002,6 +1002,7 @@ } ], "versions": { + "3.0.2": null, "3.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", diff --git a/plugins/utilities/quickturn.py b/plugins/utilities/quickturn.py index 80a5cd5..610a887 100644 --- a/plugins/utilities/quickturn.py +++ b/plugins/utilities/quickturn.py @@ -1,4 +1,3 @@ -# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) """ Quickturn by TheMikirog @@ -10,18 +9,16 @@ No Rights Reserved """ -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING import babase -import bauiv1 as bui import bascenev1 as bs import math import bascenev1lib -from bascenev1lib.actor.spaz import Spaz if TYPE_CHECKING: pass From cb7149e74608bb9a297485ca3dbb8950cb8ee2b4 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 17:01:54 +0000 Subject: [PATCH 40/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index c9da644..21f0812 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1002,7 +1002,12 @@ } ], "versions": { - "3.0.2": null, + "3.0.2": { + "api_version": 9, + "commit_sha": "43b3a41", + "released_on": "21-01-2025", + "md5sum": "3f6ad4656e2a04fc1a767f2760407c7b" + }, "3.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", From 3540260a884da87dbd9835c587a99d157e6da516 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 22:55:59 +0530 Subject: [PATCH 41/84] Updating random_play.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/random_play.py | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 21f0812..011bef4 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1317,6 +1317,7 @@ } ], "versions": { + "1.1.1": null, "1.1.0": { "api_version": 8, "commit_sha": "5fb8195", diff --git a/plugins/utilities/random_play.py b/plugins/utilities/random_play.py index a07b906..208e64b 100644 --- a/plugins/utilities/random_play.py +++ b/plugins/utilities/random_play.py @@ -1,4 +1,4 @@ -# ba_meta require api 8 +# ba_meta require api 9 from random import choice, randint from typing import Any, Union @@ -15,6 +15,7 @@ from bascenev1 import ( ) from bauiv1 import Widget, UIScale, buttonwidget +from bauiv1lib.play import PlaylistSelectContext from bauiv1lib.playlist.browser import PlaylistBrowserWindow from bascenev1lib.activity.multiteamjoin import MultiTeamJoinActivity @@ -127,14 +128,15 @@ def patched__init__( sessiontype: type[Session], transition: str | None = "in_right", origin_widget: Widget | None = None, + playlist_select_context: PlaylistSelectContext | None = None, ): width = 800 height = 650 ui_scale = babase.app.ui_v1.uiscale - y_offset = -100 if ui_scale is UIScale.SMALL else 0 - x_offset = 50 if ui_scale is UIScale.SMALL else 0 + y_offset = -95 if ui_scale is UIScale.SMALL else -35 if ui_scale is UIScale.MEDIUM else 115 + x_offset = 140 if ui_scale is UIScale.SMALL else 80 if ui_scale is UIScale.MEDIUM else 240 self.old__init__(sessiontype, transition, origin_widget) # pylint: disable=protected-access @@ -142,8 +144,8 @@ def patched__init__( parent=self._root_widget, position=(width - 120 * 2 + x_offset, height - 132 + y_offset), autoselect=True, - size=(80, 60), - scale=1.1, + size=(80, 50), + scale=0.6 if ui_scale is UIScale.SMALL else 1.15, text_scale=1.2, label="Random", on_activate_call=game_starter_factory(sessiontype), From 6142a0b8207cc4f6ba88246698cd72e423484cb7 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 17:26:25 +0000 Subject: [PATCH 42/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 011bef4..a83abfc 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1317,7 +1317,12 @@ } ], "versions": { - "1.1.1": null, + "1.1.1": { + "api_version": 9, + "commit_sha": "3540260", + "released_on": "21-01-2025", + "md5sum": "94270effa9a80a138a9c083aca087fd7" + }, "1.1.0": { "api_version": 8, "commit_sha": "5fb8195", From f6940f701baf5313bc121a1629a7e6db774a9d16 Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 21 Jan 2025 23:24:35 +0530 Subject: [PATCH 43/84] Updating rejoin.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/rejoin.py | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index a83abfc..f65ae25 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -96,6 +96,7 @@ } ], "versions": { + "2.0.1": null, "2.0.0": { "api_version": 8, "commit_sha": "333416f", diff --git a/plugins/utilities/rejoin.py b/plugins/utilities/rejoin.py index 432ed59..b0db94a 100644 --- a/plugins/utilities/rejoin.py +++ b/plugins/utilities/rejoin.py @@ -1,8 +1,8 @@ -# ba_meta require api 8 +# ba_meta require api 9 import bascenev1 as bs from babase import Plugin as v from bauiv1 import buttonwidget as z, gettexture as x -from bauiv1lib.mainmenu import MainMenuWindow as m +from bauiv1lib.ingamemenu import InGameMenuWindow as m m.i = m.p = 0 k = bs.connect_to_party @@ -10,12 +10,13 @@ k = bs.connect_to_party def j(address, port=43210, print_progress=False): try: - bs.disconnect_from_host() + if bs.get_connection_to_host_info() is not None: + bs.disconnect_from_host() + m.i = address + m.p = port + k(m.i, m.p, print_progress) except: pass - m.i = address - m.p = port - k(m.i, m.p, print_progress) def R(s): From 506451f1e5f6b862b65fedd1ceaf355bc1f5cbc8 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 17:54:59 +0000 Subject: [PATCH 44/84] [ci] auto-format --- plugins/utilities/rejoin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/rejoin.py b/plugins/utilities/rejoin.py index b0db94a..e78c98c 100644 --- a/plugins/utilities/rejoin.py +++ b/plugins/utilities/rejoin.py @@ -10,7 +10,7 @@ k = bs.connect_to_party def j(address, port=43210, print_progress=False): try: - if bs.get_connection_to_host_info() is not None: + if bs.get_connection_to_host_info() is not None: bs.disconnect_from_host() m.i = address m.p = port From 5c705c71de2145439c8ab3ed45d2f74a622cdd2b Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 17:55:00 +0000 Subject: [PATCH 45/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index f65ae25..33d89c7 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -96,7 +96,12 @@ } ], "versions": { - "2.0.1": null, + "2.0.1": { + "api_version": 9, + "commit_sha": "506451f", + "released_on": "21-01-2025", + "md5sum": "13385447ed5cc2d34396a5f57b0aed67" + }, "2.0.0": { "api_version": 8, "commit_sha": "333416f", From 9ad2e114ec71715087a6a5a2800e83cd71c8451e Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 00:14:27 +0530 Subject: [PATCH 46/84] Updating xyz_tool.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/xyz_tool.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 33d89c7..d27853a 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1546,6 +1546,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "5063690", diff --git a/plugins/utilities/xyz_tool.py b/plugins/utilities/xyz_tool.py index c3cf567..82ea232 100644 --- a/plugins/utilities/xyz_tool.py +++ b/plugins/utilities/xyz_tool.py @@ -1,6 +1,5 @@ -# Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport) # Released under the MIT License. See LICENSE for details. -# ba_meta require api 8 +# ba_meta require api 9 from __future__ import annotations from typing import TYPE_CHECKING @@ -9,12 +8,10 @@ from bascenev1lib.actor.spazfactory import SpazFactory import babase import bauiv1 as bui import bascenev1 as bs -import math import os import _babase -import shutil if TYPE_CHECKING: - pass + from typing import Sequence DECIMAL_LIMIT = 7 @@ -24,11 +21,16 @@ PlayerSpaz.supershit = PlayerSpaz.__init__ def ShitInit(self, player: bs.Player, + *, color: Sequence[float] = (1.0, 1.0, 1.0), highlight: Sequence[float] = (0.5, 0.5, 0.5), character: str = 'Spaz', powerups_expire: bool = True) -> None: - self.supershit(player, color, highlight, character, powerups_expire) + self.supershit(player, + color=color, + highlight=highlight, + character=character, + powerups_expire=powerups_expire) self.offt = bs.newnode('math', owner=self.node, attrs={ 'input1': (1.2, 1.8, -0.7), 'operation': 'add'}) self.node.connectattr('torso_position', self.offt, 'input2') @@ -93,4 +95,4 @@ class ragingspeedhorn(babase.Plugin): pass PlayerSpaz.on_punch_press = replaceable_punch PlayerSpaz.__init__ = ShitInit - PlayerSpaz.xyz = 0 + PlayerSpaz.xyz = 0 \ No newline at end of file From e2c64778206a215b126afab11924ee246bbeef7d Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 18:44:52 +0000 Subject: [PATCH 47/84] [ci] auto-format --- plugins/utilities/xyz_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/xyz_tool.py b/plugins/utilities/xyz_tool.py index 82ea232..095462f 100644 --- a/plugins/utilities/xyz_tool.py +++ b/plugins/utilities/xyz_tool.py @@ -95,4 +95,4 @@ class ragingspeedhorn(babase.Plugin): pass PlayerSpaz.on_punch_press = replaceable_punch PlayerSpaz.__init__ = ShitInit - PlayerSpaz.xyz = 0 \ No newline at end of file + PlayerSpaz.xyz = 0 From 98abd7b5c1865f071ba4b94b7249448a908d159a Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 18:44:53 +0000 Subject: [PATCH 48/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index d27853a..35e924a 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1546,7 +1546,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "e2c6477", + "released_on": "21-01-2025", + "md5sum": "480b825e187e59020b339290966b5c5a" + }, "1.0.0": { "api_version": 8, "commit_sha": "5063690", From 94742b9a317101b0d052da5e737da95ff35b2f1c Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 00:21:44 +0530 Subject: [PATCH 49/84] Updating character_maker.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/character_maker.py | 18 +----------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 35e924a..713c4fe 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -884,6 +884,7 @@ } ], "versions": { + "2.1.0": null, "2.0.1": { "api_version": 8, "commit_sha": "a3a48c2", diff --git a/plugins/utilities/character_maker.py b/plugins/utilities/character_maker.py index d417a5b..074d2d2 100644 --- a/plugins/utilities/character_maker.py +++ b/plugins/utilities/character_maker.py @@ -1,6 +1,6 @@ # Released under the MIT License. See LICENSE for details. -# ba_meta require api 8 +# ba_meta require api 9 ''' @@ -748,27 +748,11 @@ def get_player(msg, activity): return player -old_piv = bui.set_party_icon_always_visible - - -def new_piv(*args, **kwargs): - old_piv(True) - - -bui.set_party_icon_always_visible = new_piv - - -class NewMainMenuWindow(bauiv1lib.mainmenu.MainMenuWindow): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - bui.set_party_icon_always_visible(True) - # ba_meta export plugin class bySmoothy(babase.Plugin): def __init__(self): - bauiv1lib.mainmenu.MainMenuWindow = NewMainMenuWindow _babase.import_character = import_character _babase.export_character = export_character _babase.spaz_to_json = spaz_to_json From d5c9be9059db96bf616c3536bcbf74f512542927 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Tue, 21 Jan 2025 18:52:06 +0000 Subject: [PATCH 50/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 713c4fe..96013bb 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -884,7 +884,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "94742b9", + "released_on": "21-01-2025", + "md5sum": "6fa2e76b9d90ab9a7b801c2245f1a017" + }, "2.0.1": { "api_version": 8, "commit_sha": "a3a48c2", From 0ec76ff890ff14a7009cd6db4c78e44d740bb4c0 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 00:23:30 +0530 Subject: [PATCH 51/84] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86d2222..95e279f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) -**Important:** For bombsquad version < 1.7.37 +**Important:** For bombsquad version less than 1.7.37 (bombsquad version < 1.7.37) - for version 1.7.0 to 1.7.19 checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch - for version 1.7.20 to 1.7.36 checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch ------------------------------- From 8982f0e3edc03df5d96058a58034ae92f947681e Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 19:24:00 +0530 Subject: [PATCH 52/84] Updating auto_stunt.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/auto_stunt.py | 56 ++++++++++++++++----------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 96013bb..57d8b0b 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -760,6 +760,7 @@ } ], "versions": { + "1.1.0": null, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", diff --git a/plugins/utilities/auto_stunt.py b/plugins/utilities/auto_stunt.py index aadf8c7..a166bbc 100644 --- a/plugins/utilities/auto_stunt.py +++ b/plugins/utilities/auto_stunt.py @@ -1,5 +1,4 @@ -# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport) -# ba_meta require api 8 +# ba_meta require api 9 # AutoStunt mod by - Mr.Smoothy x Rikko # https://discord.gg/ucyaesh # https://bombsquad-community.web.app/home @@ -12,15 +11,12 @@ import bauiv1 as bui import bascenev1 as bs import _babase import bascenev1lib -from bascenev1lib.actor.text import Text from bascenev1lib.actor.image import Image from bascenev1lib.actor import spaz -from bascenev1lib.actor import playerspaz from bascenev1lib.gameutils import SharedObjects from bascenev1lib.actor.powerupbox import PowerupBoxFactory from bascenev1lib.actor.spazfactory import SpazFactory from bascenev1lib.game.elimination import EliminationGame -from bauiv1lib import mainmenu import math import json import os @@ -73,10 +69,10 @@ class ControlsUI: channel * 0.5 for channel in activity._bomb_image.node.color[:3]) + [1] def on_move_ud(activity, value): - activity.set_stick_image_position(activity, x=activity.stick_image_position_x, y=value) + activity.set_stick_image_position(activity.stick_image_position_x, value) def on_move_lr(activity, value): - activity.set_stick_image_position(activity, x=value, y=activity.stick_image_position_y) + activity.set_stick_image_position(value, activity.stick_image_position_y) def display(activity): activity._jump_image.node.color = list(activity._jump_image.node.color[:3]) + [1] @@ -296,7 +292,11 @@ def replay(player, stunt_name): def spawn_mirror_spaz(player): player.mirror_mode = True with player.actor._activity().context: - bot = spaz.Spaz(player.color, player.highlight, character=player.character).autoretain() + bot = spaz.Spaz( + color=player.color, + highlight=player.highlight, + character=player.character + ).autoretain() bot.handlemessage(bs.StandMessage( (player.actor.node.position[0], player.actor.node.position[1], player.actor.node.position[2]+1), 93)) bot.node.name = player.actor.node.name @@ -319,10 +319,10 @@ def ghost(player, stunt_name): player.in_replay = True with player.actor._activity().context: - bot = spaz.Spaz((1, 0, 0), character="Spaz").autoretain() + bot = spaz.Spaz(color=(1, 0, 0), character="Spaz").autoretain() bot.handlemessage(bs.StandMessage(player.actor.node.position, 93)) give_ghost_power(bot) - ControlsUI.display(player.actor._activity()) + ControlsUI.display(bot._activity()) for move in stunt: value = move["move"]["value"] if value is None: @@ -427,20 +427,26 @@ def new_chatmessage(msg): if len(msg_splits) < 2: bui.screenmessage("Enter name of stunt eg : *stunt bombjump") return original_chatmessage(msg) - replay(player, stunt_name) - bs.chatmessage('Replaying "{}" on {}.'.format( - stunt_name, - player.getname(), - )) + if player is not None and player.actor is not None: + replay(player, stunt_name) + bs.chatmessage('Replaying "{}" on {}.'.format( + stunt_name, + player.getname(), + )) + else: + bui.screenmessage("Player not found") elif command == "learn": if len(msg_splits) < 2: bui.screenmessage("Enter name of stunt eg : *learn bombjump") return original_chatmessage(msg) - ghost(player, stunt_name) - bs.chatmessage('Replaying "{}" on {}.'.format( - stunt_name, - player.getname(), - )) + if player is not None and player.actor is not None: + ghost(player, stunt_name) + bs.chatmessage('Replaying "{}" on {}.'.format( + stunt_name, + player.getname(), + )) + else: + bui.screenmessage("Player not found") elif command == "mirror": spawn_mirror_spaz(player) return original_chatmessage(msg) @@ -531,23 +537,15 @@ def on_begin(self, *args, **kwargs) -> None: }) self._stick_base_image.opacity = 0.0 self._stick_nub_image.opacity = 0.0 - self.set_stick_image_position = set_stick_image_position return original_on_begin(self, *args, **kwargs) - -class NewMainMenuWindow(mainmenu.MainMenuWindow): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - # Display chat icon, but if user open/close gather it may disappear - bui.set_party_icon_always_visible(True) - # ba_meta export plugin class byHeySmoothy(babase.Plugin): def on_app_running(self): - mainmenu.MainMenuWindow = NewMainMenuWindow bs._activity.Activity.on_begin = on_begin + bs._activity.Activity.set_stick_image_position = set_stick_image_position bs.chatmessage = new_chatmessage bascenev1lib.actor.playerspaz.PlayerSpaz = NewPlayerSpaz bascenev1lib.actor.spaz.Spaz = NewSpaz From df866621a6abcaa0aba211db7d01e137ec745440 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 13:54:24 +0000 Subject: [PATCH 53/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 57d8b0b..ec7adc2 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -760,7 +760,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "8982f0e", + "released_on": "22-01-2025", + "md5sum": "df20190b079bbf80f1e061339930e5f7" + }, "1.0.1": { "api_version": 8, "commit_sha": "2b5c9ee", From 85716bb6d200c8ec84424f65821278d95ab40085 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 19:29:25 +0530 Subject: [PATCH 54/84] Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 95e279f..986991a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) -**Important:** For bombsquad version less than 1.7.37 (bombsquad version < 1.7.37) -- for version 1.7.0 to 1.7.19 checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch -- for version 1.7.20 to 1.7.36 checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch +**Important:** For bombsquad version less than 1.7.37 (bombsquad version < 1.7.37), check below. +- for version 1.7.0 to 1.7.19 checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. +- for version 1.7.20 to 1.7.36 checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. + +If you have version 1.7.37 or more (which uses api 9), proceed with the rest of the README here. + ------------------------------- # Plugin-Manager From 1a7b7731ae6f4e72fa37dbbf6c36b73c2151fd72 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 19:38:26 +0530 Subject: [PATCH 55/84] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 986991a..50885eb 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) -**Important:** For bombsquad version less than 1.7.37 (bombsquad version < 1.7.37), check below. -- for version 1.7.0 to 1.7.19 checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. -- for version 1.7.20 to 1.7.36 checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. +**Important:** If you are not sure about which branch to see, check below. +- for version 1.7.0 to 1.7.19 (which uses api 7), checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. +- for version 1.7.20 to 1.7.36 (which uses api 8), checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. If you have version 1.7.37 or more (which uses api 9), proceed with the rest of the README here. ------------------------------- -# Plugin-Manager +# Plugin Manager -A plugin manager for the game - [Bombsquad](https://www.froemling.net/apps/bombsquad). Plugin manager is a plugin in itself, +A plugin manager for the game - [Bombsquad](https://www.froemling.net/apps/bombsquad). Plugin Manager is a plugin in and of itself, which makes further modding of your game more convenient by providing easier access to community created content. [![DownloadIcon]][DownloadLink] From 07066e865bb237d15364e5a51636fc8a0f436108 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 20:27:55 +0530 Subject: [PATCH 56/84] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 50885eb..9a3c9b2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) **Important:** If you are not sure about which branch to see, check below. -- for version 1.7.0 to 1.7.19 (which uses api 7), checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. -- for version 1.7.20 to 1.7.36 (which uses api 8), checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. +- for version 1.7.0 to 1.7.19 (which uses API 7), checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. +- for version 1.7.20 to 1.7.36 (which uses API 8), checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. -If you have version 1.7.37 or more (which uses api 9), proceed with the rest of the README here. +If you have version 1.7.37 or more (which uses API 9), proceed with the rest of the README here. ------------------------------- From 0e211348910597e58a337bb84494efc9effdae50 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 20:30:01 +0530 Subject: [PATCH 57/84] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a3c9b2..9e30c42 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ There are two different ways the plugin manager can be installed: Let's say you wanna submit this new utility-type plugin named as `sample_plugin.py`: ```python -# ba_meta require api 8 +# ba_meta require api 9 import babase # ba_meta export babase.Plugin From aafab93c0ee9e4c94ea56e6689d968b31aeb8d27 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 20:33:18 +0530 Subject: [PATCH 58/84] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e30c42..74cbbd0 100644 --- a/README.md +++ b/README.md @@ -243,5 +243,5 @@ create something similar, with a hope we as a community can continue to keep it information. - Any plugins you submit here are automatically assumed to be licensed under the MIT license, i.e. unless you explicitly specify a different license in your plugin's source code. See - [this plugin](https://github.com/rikkolovescats/plugin-manager/blob/f29008acdbf54988f3622ae4baa8735d83338bb5/plugins/utilities/store_event_specials.py#L1-L22) + [this plugin](https://github.com/bombsquad-community/plugin-manager/blob/main/plugins/utilities/store_event_specials.py#L1-L22) for an example. From bc21a7d3e23e5b9ff3ed012cc5750e553bfe9cb4 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 21:09:21 +0530 Subject: [PATCH 59/84] Updating tag.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/tag.py | 72 ++++++++++++++++------------------------ 2 files changed, 30 insertions(+), 43 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index ec7adc2..8c24d48 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1539,6 +1539,7 @@ } ], "versions": { + "2.1.0": null, "2.0.1": { "api_version": 8, "commit_sha": "718039b", diff --git a/plugins/utilities/tag.py b/plugins/utilities/tag.py index 24139ae..f38065b 100644 --- a/plugins/utilities/tag.py +++ b/plugins/utilities/tag.py @@ -1,5 +1,3 @@ -# Ported by brostos to api 8 -# Tool used to make porting easier.(https://github.com/bombsquad-community/baport) """ I apreciate any kind of modification. So feel free to use or edit code or change credit string.... no problem. @@ -16,10 +14,8 @@ how to use: from __future__ import annotations from bauiv1lib.profile.edit import EditProfileWindow -from bauiv1lib.colorpicker import ColorPicker from bauiv1lib.popup import PopupMenu from bascenev1lib.actor.playerspaz import PlayerSpaz -from baenv import TARGET_BALLISTICA_BUILD as build_number import babase import bauiv1 as bui import bascenev1 as bs @@ -95,7 +91,7 @@ def gethostname() -> str: if player.inputdevice.client_id == -1: name = player.getname(full=True, icon=False) break - if name == bui.app.plus.get_v1_account_name: + if name == bui.app.plus.get_v1_account_name(): return '__account__' return name @@ -113,7 +109,11 @@ def NewPlayerSzapInit(self, highlight: Sequence[float] = (0.5, 0.5, 0.5), character: str = 'Spaz', powerups_expire: bool = True) -> None: - self.init(player, color, highlight, character, powerups_expire) + self.init(player, + color=color, + highlight=highlight, + character=character, + powerups_expire=powerups_expire) self.curname = gethostname() try: @@ -153,14 +153,13 @@ def NewPlayerSzapInit(self, def NewEditProfileWindowInit(self, existing_profile: Optional[str], - in_main_menu: bool, - transition: str = 'in_right') -> None: + transition: str = 'in_right', + origin_widget: bui.Widget | None = None) -> None: """ New boilerplate for editprofilewindow, addeds button to call TagSettings window """ self.existing_profile = existing_profile - self.in_main_menu = in_main_menu - self.init(existing_profile, in_main_menu, transition) + self.init(existing_profile, transition, origin_widget) v = self._height - 115.0 x_inset = self._x_inset @@ -178,20 +177,23 @@ def NewEditProfileWindowInit(self, text_scale=1.2, on_activate_call=babase.Call(_on_tagwinbtn_press, self)) - def _on_tagwinbtn_press(self): """ Calls tag config window passes all paramisters """ - bui.containerwidget(edit=self._root_widget, transition='out_scale') - bui.app.ui_v1.set_main_menu_window( - TagWindow(self.existing_profile, - self.in_main_menu, - self._name, - transition='in_right').get_root_widget(), from_window=self._root_widget) + if not self.main_window_has_control(): + return + self.main_window_replace( + TagWindow( + self.existing_profile, + self._name, + transition='in_right', + origin_widget=self.tagwinbtn + ) + ) -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export plugin class Tag(babase.Plugin): def __init__(self) -> None: @@ -211,15 +213,14 @@ class Tag(babase.Plugin): EditProfileWindow.__init__ = NewEditProfileWindowInit -class TagWindow(bui.Window): +class TagWindow(bui.MainWindow): def __init__(self, existing_profile: Optional[str], - in_main_menu: bool, profilename: str, - transition: Optional[str] = 'in_right'): + transition: Optional[str] = 'in_right', + origin_widget: bui.Widget | None = None): self.existing_profile = existing_profile - self.in_main_menu = in_main_menu self.profilename = profilename uiscale = bui.app.ui_v1.uiscale @@ -233,9 +234,11 @@ class TagWindow(bui.Window): super().__init__( root_widget=bui.containerwidget( size=(self._width, self._height), - transition=transition, scale=(2.06 if uiscale is babase.UIScale.SMALL else - 1.4 if uiscale is babase.UIScale.MEDIUM else 1.0))) + 1.4 if uiscale is babase.UIScale.MEDIUM else 1.0) + ), + transition=transition, + origin_widget=origin_widget) self._back_button = bui.buttonwidget( parent=self._root_widget, @@ -246,7 +249,7 @@ class TagWindow(bui.Window): scale=0.8, label=babase.charstr(babase.SpecialChar.BACK), button_type='backSmall', - on_activate_call=self._back) + on_activate_call=self.main_window_back) bui.containerwidget(edit=self._root_widget, cancel_button=self._back_button) self._save_button = bui.buttonwidget( @@ -419,17 +422,6 @@ class TagWindow(bui.Window): increment=0.1, textscale=1.25) - def _back(self) -> None: - """ - transit window into back window - """ - bui.containerwidget(edit=self._root_widget, - transition='out_scale') - bui.app.ui_v1.set_main_menu_window(EditProfileWindow( - self.existing_profile, - self.in_main_menu, - transition='in_left').get_root_widget(), from_window=self._root_widget) - def change_val(self, config: List[str], val: bool) -> None: """ chamges the value of check boxes @@ -465,13 +457,7 @@ class TagWindow(bui.Window): bui.screenmessage(f"please define tag", color=(1, 0, 0)) bui.getsound('error').play() - bui.containerwidget(edit=self._root_widget, - transition='out_scale') - bui.app.ui_v1.set_main_menu_window(EditProfileWindow( - self.existing_profile, - self.in_main_menu, - transition='in_left').get_root_widget(), from_window=self._root_widget) - + self.main_window_back() class CustomConfigNumberEdit: """A set of controls for editing a numeric config value. From 7d6ed3d6f58c8201a0e481cd9c687bea4c7b6743 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 15:39:46 +0000 Subject: [PATCH 60/84] [ci] auto-format --- plugins/utilities/tag.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/utilities/tag.py b/plugins/utilities/tag.py index f38065b..82ba52e 100644 --- a/plugins/utilities/tag.py +++ b/plugins/utilities/tag.py @@ -177,6 +177,7 @@ def NewEditProfileWindowInit(self, text_scale=1.2, on_activate_call=babase.Call(_on_tagwinbtn_press, self)) + def _on_tagwinbtn_press(self): """ Calls tag config window passes all paramisters @@ -195,6 +196,8 @@ def _on_tagwinbtn_press(self): # ba_meta require api 9 # ba_meta export plugin + + class Tag(babase.Plugin): def __init__(self) -> None: """ @@ -459,6 +462,7 @@ class TagWindow(bui.MainWindow): self.main_window_back() + class CustomConfigNumberEdit: """A set of controls for editing a numeric config value. From 6a80e330c17020f9c9b624ad47f297339dc714e2 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 15:39:47 +0000 Subject: [PATCH 61/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 8c24d48..83a6a4e 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -1539,7 +1539,12 @@ } ], "versions": { - "2.1.0": null, + "2.1.0": { + "api_version": 9, + "commit_sha": "7d6ed3d", + "released_on": "22-01-2025", + "md5sum": "c3af893247488915d26585d0957171d8" + }, "2.0.1": { "api_version": 8, "commit_sha": "718039b", From baa586265f13ef7184407a97fae44fb3e689ad9b Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 21:47:33 +0530 Subject: [PATCH 62/84] Updating updown.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/updown.py | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 83a6a4e..b723554 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -77,6 +77,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "333416f", diff --git a/plugins/utilities/updown.py b/plugins/utilities/updown.py index f5ecc53..56b2ea4 100644 --- a/plugins/utilities/updown.py +++ b/plugins/utilities/updown.py @@ -1,7 +1,6 @@ import babase as ba import bauiv1 as bui import bauiv1lib.party -from bauiv1lib.popup import PopupWindow from bascenev1 import get_chat_messages as gcm, screenmessage as push @@ -11,6 +10,7 @@ class VeryPW(bauiv1lib.party.PartyWindow): s._n = 0 s._o = "" s._f = True + s._chat_texts_haxx = [] for i in range(2): bui.buttonwidget( parent=s._root_widget, @@ -41,6 +41,8 @@ class VeryPW(bauiv1lib.party.PartyWindow): s._n = -1 s._c(s._o) + for msg in s._chat_texts: + msg.delete() for msg in s._chat_texts_haxx: msg.delete() for z in range(len(s._w1)): @@ -61,15 +63,15 @@ class VeryPW(bauiv1lib.party.PartyWindow): flatness=1.0) bui.textwidget(edit=txt, on_activate_call=ba.Call( - s._on_chat_press, - s._w1[z], txt)) + s._copy_msg, + s._w1[z])) s._chat_texts_haxx.append(txt) bui.containerwidget(edit=s._columnwidget, visible_child=txt) -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export plugin class byBordd(ba.Plugin): def __init__(s): - bauiv1lib.party.PartyWindow = VeryPW + bauiv1lib.party.PartyWindow = VeryPW \ No newline at end of file From 90cbaf7e590439be6fa4fe98afe2fb18ed7ba3f3 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 16:17:57 +0000 Subject: [PATCH 63/84] [ci] auto-format --- plugins/utilities/updown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/updown.py b/plugins/utilities/updown.py index 56b2ea4..0e91483 100644 --- a/plugins/utilities/updown.py +++ b/plugins/utilities/updown.py @@ -74,4 +74,4 @@ class VeryPW(bauiv1lib.party.PartyWindow): class byBordd(ba.Plugin): def __init__(s): - bauiv1lib.party.PartyWindow = VeryPW \ No newline at end of file + bauiv1lib.party.PartyWindow = VeryPW From 15822ff10ca35ea07eddd7883f27bf657187fd1a Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 16:17:58 +0000 Subject: [PATCH 64/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index b723554..4501c37 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -77,7 +77,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "90cbaf7", + "released_on": "22-01-2025", + "md5sum": "b287c940c143bf9c4831477742dbd913" + }, "1.0.0": { "api_version": 8, "commit_sha": "333416f", From 4396cc1c0bbb3ee8a668b0007bd8efe00bc7f390 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 22:52:46 +0530 Subject: [PATCH 65/84] Updating easy_connect.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/easy_connect.py | 31 ++++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 4501c37..bdd9f79 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -680,6 +680,7 @@ } ], "versions": { + "3.0.0": null, "2.0.0": { "api_version": 8, "commit_sha": "0c5ce76", diff --git a/plugins/utilities/easy_connect.py b/plugins/utilities/easy_connect.py index c925515..e1ed00c 100644 --- a/plugins/utilities/easy_connect.py +++ b/plugins/utilities/easy_connect.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -# ba_meta require api 8 +# ba_meta require api 9 ''' =========================================== EasyConnect by Mr.Smoothy | verion 1.7 | https://discord.gg/ucyaesh | Serverconnector X IPPORTRevealer | - for bombsquad v1.7.20+ | + for bombsquad v1.7.37+ | ============================================== ''' @@ -26,9 +26,9 @@ # https://discord.gg/ucyaesh # REQUIREMENTS -# built for bs 1.7.20 and above +# built for bs 1.7.37 and above -# by Mr.Smoothy for Bombsquad version 1.7.20+ +# by Mr.Smoothy for Bombsquad version 1.7.37+ import _babase import babase @@ -40,7 +40,7 @@ from bauiv1lib import popup from dataclasses import dataclass import random from enum import Enum -from bauiv1lib.popup import PopupMenuWindow, PopupWindow +from bauiv1lib.popup import PopupMenuWindow from typing import Any, Optional, Callable from bauiv1lib.gather.publictab import PublicGatherTab import json @@ -114,12 +114,12 @@ class _HostLookupThread(threading.Thread): from_other_thread=True) -def newbuild_favorites_tab(self, region_height: float) -> None: +def newbuild_favorites_tab(self, region_width: float, region_height: float) -> None: c_height = region_height - 20 v = c_height - 35 - 25 - 30 self.retry_inter = 0.0 uiscale = bui.app.ui_v1.uiscale - self._width = 1240 if uiscale is babase.UIScale.SMALL else 1040 + self._width = region_width x_inset = 100 if uiscale is babase.UIScale.SMALL else 0 self._height = (578 if uiscale is babase.UIScale.SMALL else 670 if uiscale is babase.UIScale.MEDIUM else 800) @@ -241,6 +241,23 @@ def newbuild_favorites_tab(self, region_height: float) -> None: border=2, margin=0, claims_left_right=True) + self._no_parties_added_text = bui.textwidget( + parent=self._container, + size=(0, 0), + h_align='center', + v_align='center', + text='', + color=(0.6, 0.6, 0.6), + scale=1.2, + position=( + ( + (240 if uiscale is bui.UIScale.SMALL else 225) + + sub_scroll_width * 0.5 + ), + v + sub_scroll_height * 0.5, + ), + glow_type='uniform', + ) self._favorite_selected = None self._refresh_favorites() From 32e5180ab26a60cfcf9c6b9aa6a46b2b7e09e32e Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 17:23:09 +0000 Subject: [PATCH 66/84] [ci] auto-format --- plugins/utilities/easy_connect.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/utilities/easy_connect.py b/plugins/utilities/easy_connect.py index e1ed00c..7faf647 100644 --- a/plugins/utilities/easy_connect.py +++ b/plugins/utilities/easy_connect.py @@ -242,22 +242,22 @@ def newbuild_favorites_tab(self, region_width: float, region_height: float) -> N margin=0, claims_left_right=True) self._no_parties_added_text = bui.textwidget( - parent=self._container, - size=(0, 0), - h_align='center', - v_align='center', - text='', - color=(0.6, 0.6, 0.6), - scale=1.2, - position=( - ( - (240 if uiscale is bui.UIScale.SMALL else 225) - + sub_scroll_width * 0.5 - ), - v + sub_scroll_height * 0.5, + parent=self._container, + size=(0, 0), + h_align='center', + v_align='center', + text='', + color=(0.6, 0.6, 0.6), + scale=1.2, + position=( + ( + (240 if uiscale is bui.UIScale.SMALL else 225) + + sub_scroll_width * 0.5 ), - glow_type='uniform', - ) + v + sub_scroll_height * 0.5, + ), + glow_type='uniform', + ) self._favorite_selected = None self._refresh_favorites() From 25c0e25848f9660d2236aba3d59c7c090b181fb7 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 17:23:10 +0000 Subject: [PATCH 67/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index bdd9f79..72f4790 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -680,7 +680,12 @@ } ], "versions": { - "3.0.0": null, + "3.0.0": { + "api_version": 9, + "commit_sha": "32e5180", + "released_on": "22-01-2025", + "md5sum": "b1742bdaf76b60a2eaf62cdcfebdbd52" + }, "2.0.0": { "api_version": 8, "commit_sha": "0c5ce76", From 8bdc2fcb52ebe19c7473e9dba60466ff8da39115 Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 23:18:50 +0530 Subject: [PATCH 68/84] Updating topmsg.py to api 9 --- plugins/utilities.json | 1 + plugins/utilities/topmsg.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 72f4790..98e951f 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -127,6 +127,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "333416f", diff --git a/plugins/utilities/topmsg.py b/plugins/utilities/topmsg.py index 263083b..c471fc9 100644 --- a/plugins/utilities/topmsg.py +++ b/plugins/utilities/topmsg.py @@ -2,7 +2,7 @@ from babase import app, Plugin as p from bascenev1 import gettexture as x, apptimer as z from bascenev1 import broadcastmessage as push, get_foreground_host_activity as ga, get_chat_messages as gcm -# ba_meta require api 8 +# ba_meta require api 9 # ba_meta export plugin @@ -22,4 +22,4 @@ class byBordd(p): s.ear() -z(0.2, byBordd().get) +z(1.0, byBordd().get) \ No newline at end of file From bbd775369156549accafcc59e18dd848f58e29e0 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 17:49:14 +0000 Subject: [PATCH 69/84] [ci] auto-format --- plugins/utilities/topmsg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/topmsg.py b/plugins/utilities/topmsg.py index c471fc9..21eddd9 100644 --- a/plugins/utilities/topmsg.py +++ b/plugins/utilities/topmsg.py @@ -22,4 +22,4 @@ class byBordd(p): s.ear() -z(1.0, byBordd().get) \ No newline at end of file +z(1.0, byBordd().get) From 619998e218f04793210255e199ebc3ff73e7bfc6 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 17:49:15 +0000 Subject: [PATCH 70/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 98e951f..ad514bc 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -127,7 +127,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "bbd7753", + "released_on": "22-01-2025", + "md5sum": "7a30597198881b7a1cee2a220230b934" + }, "1.0.0": { "api_version": 8, "commit_sha": "333416f", From 4d100d1ffdbcab70e3856c7454d11719e28e4f7e Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 22 Jan 2025 23:51:41 +0530 Subject: [PATCH 71/84] Updating manual_camera to api 9 --- plugins/utilities.json | 1 + plugins/utilities/manual_camera.py | 47 ++++++++++++++++-------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index ad514bc..a538eee 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -238,6 +238,7 @@ } ], "versions": { + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "c26342d", diff --git a/plugins/utilities/manual_camera.py b/plugins/utilities/manual_camera.py index cb944b4..d244795 100644 --- a/plugins/utilities/manual_camera.py +++ b/plugins/utilities/manual_camera.py @@ -1,4 +1,4 @@ -# ba_meta require api 8 +# ba_meta require api 9 ################### # Credits - Droopy#3730. # @@ -10,16 +10,20 @@ from __future__ import annotations import _babase import babase -import bascenev1 as bs import bauiv1 as bui -from bauiv1lib.mainmenu import MainMenuWindow +from bauiv1lib.ingamemenu import InGameMenuWindow -class Manual_camera_window: - def __init__(self): - self._root_widget = bui.containerwidget( - on_outside_click_call=None, - size=(0, 0)) +class Manual_camera_window(bui.MainWindow): + def __init__(self, origin_widget): + super().__init__( + root_widget=bui.containerwidget( + on_outside_click_call=None, + size=(0, 0) + ), + transition='in_scale', + origin_widget=origin_widget, + ) button_size = (50, 50) self._text = bui.textwidget(parent=self._root_widget, scale=0.65, @@ -149,15 +153,10 @@ class Manual_camera_window: button_type='square', autoselect=True, position=(520, -100), - on_activate_call=self._close) + on_activate_call=self.main_window_back) bui.containerwidget(edit=self._root_widget, cancel_button=self._done) - def _close(self): - bui.containerwidget(edit=self._root_widget, - transition=('out_scale')) - MainMenuWindow() - def _change_camera_position(self, direction): camera = _babase.get_camera_position() x = camera[0] @@ -212,7 +211,7 @@ class Manual_camera_window: _babase.set_camera_target(x, y, z) -old_refresh_in_game = MainMenuWindow._refresh_in_game +old_refresh_in_game = InGameMenuWindow._refresh_in_game def my_refresh_in_game(self, *args, **kwargs): @@ -224,19 +223,23 @@ def my_refresh_in_game(self, *args, **kwargs): size=(70, 50), button_type='square', label='Manual\nCamera', - text_scale=1.5, - on_activate_call=self._manual_camera) + text_scale=1.5) + + bui.buttonwidget(edit=camera_button, + on_activate_call=bui.Call(self._manual_camera, camera_button) return value -def _manual_camera(self): - bui.containerwidget(edit=self._root_widget, transition='out_scale') - Manual_camera_window() +def _manual_camera(self, widget): + if not self.main_window_has_control(): + return + + self.main_window_replace(Manual_camera_window(origin_widget=widget)) # ba_meta export plugin class ByDroopy(babase.Plugin): def __init__(self): - MainMenuWindow._refresh_in_game = my_refresh_in_game - MainMenuWindow._manual_camera = _manual_camera + InGameMenuWindow._refresh_in_game = my_refresh_in_game + InGameMenuWindow._manual_camera = _manual_camera \ No newline at end of file From 1200efb66e19c99b8e60b2623023be55b630b1df Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 18:22:06 +0000 Subject: [PATCH 72/84] [ci] auto-format --- plugins/utilities/manual_camera.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/utilities/manual_camera.py b/plugins/utilities/manual_camera.py index d244795..d246433 100644 --- a/plugins/utilities/manual_camera.py +++ b/plugins/utilities/manual_camera.py @@ -224,7 +224,7 @@ def my_refresh_in_game(self, *args, **kwargs): button_type='square', label='Manual\nCamera', text_scale=1.5) - + bui.buttonwidget(edit=camera_button, on_activate_call=bui.Call(self._manual_camera, camera_button) return value @@ -241,5 +241,5 @@ def _manual_camera(self, widget): class ByDroopy(babase.Plugin): def __init__(self): - InGameMenuWindow._refresh_in_game = my_refresh_in_game - InGameMenuWindow._manual_camera = _manual_camera \ No newline at end of file + InGameMenuWindow._refresh_in_game=my_refresh_in_game + InGameMenuWindow._manual_camera=_manual_camera From 8f12fe75e95bbdac2aecb5d39c76b2fda17707d8 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Wed, 22 Jan 2025 18:22:07 +0000 Subject: [PATCH 73/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index a538eee..37d6712 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -238,7 +238,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "1200efb", + "released_on": "22-01-2025", + "md5sum": "9075bd45367bded21fb9f55704de4210" + }, "1.0.0": { "api_version": 8, "commit_sha": "c26342d", From 2e8cef5fc35aa21f120e14071adb640ce251d891 Mon Sep 17 00:00:00 2001 From: Vishal Date: Thu, 23 Jan 2025 20:12:47 +0530 Subject: [PATCH 74/84] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74cbbd0..9e30c42 100644 --- a/README.md +++ b/README.md @@ -243,5 +243,5 @@ create something similar, with a hope we as a community can continue to keep it information. - Any plugins you submit here are automatically assumed to be licensed under the MIT license, i.e. unless you explicitly specify a different license in your plugin's source code. See - [this plugin](https://github.com/bombsquad-community/plugin-manager/blob/main/plugins/utilities/store_event_specials.py#L1-L22) + [this plugin](https://github.com/rikkolovescats/plugin-manager/blob/f29008acdbf54988f3622ae4baa8735d83338bb5/plugins/utilities/store_event_specials.py#L1-L22) for an example. From be15bf34f9bc426c767b5d21e2f0098fd41764c8 Mon Sep 17 00:00:00 2001 From: Vishal Date: Thu, 23 Jan 2025 20:26:46 +0530 Subject: [PATCH 75/84] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e30c42..21ff4da 100644 --- a/README.md +++ b/README.md @@ -243,5 +243,5 @@ create something similar, with a hope we as a community can continue to keep it information. - Any plugins you submit here are automatically assumed to be licensed under the MIT license, i.e. unless you explicitly specify a different license in your plugin's source code. See - [this plugin](https://github.com/rikkolovescats/plugin-manager/blob/f29008acdbf54988f3622ae4baa8735d83338bb5/plugins/utilities/store_event_specials.py#L1-L22) + [this plugin](https://github.com/bombsquad-community/plugin-manager/blob/cba1194c68ce550a71d2f3fadd9e1b8cbac4981c/plugins/utilities/store_event_specials.py#L1-L22) for an example. From 8f194f398593f73c7625e1beb1ab2d6c4fa5fe31 Mon Sep 17 00:00:00 2001 From: Vishal Date: Thu, 23 Jan 2025 21:00:42 +0530 Subject: [PATCH 76/84] Fixing error --- plugins/utilities/manual_camera.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/manual_camera.py b/plugins/utilities/manual_camera.py index d246433..5bb2a52 100644 --- a/plugins/utilities/manual_camera.py +++ b/plugins/utilities/manual_camera.py @@ -226,7 +226,7 @@ def my_refresh_in_game(self, *args, **kwargs): text_scale=1.5) bui.buttonwidget(edit=camera_button, - on_activate_call=bui.Call(self._manual_camera, camera_button) + on_activate_call=bui.Call(self._manual_camera, camera_button)) return value From cb86b1a89fc706c673d18e8e190fa270dde06e73 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Thu, 23 Jan 2025 15:31:07 +0000 Subject: [PATCH 77/84] [ci] auto-format --- plugins/utilities/manual_camera.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/utilities/manual_camera.py b/plugins/utilities/manual_camera.py index 5bb2a52..83b87b1 100644 --- a/plugins/utilities/manual_camera.py +++ b/plugins/utilities/manual_camera.py @@ -241,5 +241,5 @@ def _manual_camera(self, widget): class ByDroopy(babase.Plugin): def __init__(self): - InGameMenuWindow._refresh_in_game=my_refresh_in_game - InGameMenuWindow._manual_camera=_manual_camera + InGameMenuWindow._refresh_in_game = my_refresh_in_game + InGameMenuWindow._manual_camera = _manual_camera From ffc4b85ee4af61e13791ccbb16decec55d55fae7 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Fri, 24 Jan 2025 01:13:54 +0530 Subject: [PATCH 78/84] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21ff4da..fc95569 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) -**Important:** If you are not sure about which branch to see, check below. +**Important:** If you are on bombsquad version < 1.7.37 , check below. - for version 1.7.0 to 1.7.19 (which uses API 7), checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. - for version 1.7.20 to 1.7.36 (which uses API 8), checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. @@ -10,7 +10,7 @@ If you have version 1.7.37 or more (which uses API 9), proceed with the rest of # Plugin Manager -A plugin manager for the game - [Bombsquad](https://www.froemling.net/apps/bombsquad). Plugin Manager is a plugin in and of itself, +A plugin manager for the game - [Bombsquad](https://www.froemling.net/apps/bombsquad). Plugin Manager is a plugin in itself, which makes further modding of your game more convenient by providing easier access to community created content. [![DownloadIcon]][DownloadLink] From 022f8798e83f00e3d9cceaac84cde745f4bd77a6 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Fri, 24 Jan 2025 01:16:48 +0530 Subject: [PATCH 79/84] ci fix --- plugins/utilities.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 37d6712..a538eee 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -238,12 +238,7 @@ } ], "versions": { - "1.1.0": { - "api_version": 9, - "commit_sha": "1200efb", - "released_on": "22-01-2025", - "md5sum": "9075bd45367bded21fb9f55704de4210" - }, + "1.1.0": null, "1.0.0": { "api_version": 8, "commit_sha": "c26342d", From 97f68e1870aeefa4cde80e1ae15b62b8e9705eee Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Thu, 23 Jan 2025 19:47:26 +0000 Subject: [PATCH 80/84] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index a538eee..9b721a0 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -238,7 +238,12 @@ } ], "versions": { - "1.1.0": null, + "1.1.0": { + "api_version": 9, + "commit_sha": "022f879", + "released_on": "23-01-2025", + "md5sum": "78a27e0fce1965ffcfdb055c33d49185" + }, "1.0.0": { "api_version": 8, "commit_sha": "c26342d", From 60b7ba3510eaf61f3cba0ac347d65ac594ce4784 Mon Sep 17 00:00:00 2001 From: Loup <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:26:49 +0530 Subject: [PATCH 81/84] < replaced with less than in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc95569..87aa25a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![CI](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bombsquad-community/plugin-manager/actions/workflows/ci.yml) -**Important:** If you are on bombsquad version < 1.7.37 , check below. +**Important:** If you are on bombsquad version less than 1.7.37 , check below. - for version 1.7.0 to 1.7.19 (which uses API 7), checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. - for version 1.7.20 to 1.7.36 (which uses API 8), checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. From 273df61827c06681a7639b3899f7a6b0b1b67bde Mon Sep 17 00:00:00 2001 From: Loup <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:30:40 +0530 Subject: [PATCH 82/84] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87aa25a..5a46f75 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ - for version 1.7.0 to 1.7.19 (which uses API 7), checkout the [api7](https://github.com/bombsquad-community/plugin-manager/tree/api7) branch. - for version 1.7.20 to 1.7.36 (which uses API 8), checkout the [api8](https://github.com/bombsquad-community/plugin-manager/tree/api8) branch. -If you have version 1.7.37 or more (which uses API 9), proceed with the rest of the README here. +If you have version 1.7.37 or greater (which uses API 9), proceed with the rest of the README here. ------------------------------- From 9eeb941cc2b9fbedcd3f81278d9085e57df1dabe Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 24 Jan 2025 01:54:25 +0530 Subject: [PATCH 83/84] Updating date --- CHANGELOG.md | 2 +- index.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4719d6..30da0e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Plugin Manager (dd-mm-yyyy) -### 1.1.0 (15-01-2025) +### 1.1.0 (24-01-2025) - Updated to bombsquad api 9. diff --git a/index.json b/index.json index 8093895..18fa305 100644 --- a/index.json +++ b/index.json @@ -4,7 +4,7 @@ "1.1.0": { "api_version": 9, "commit_sha": "4b39a24", - "released_on": "21-01-2025", + "released_on": "24-01-2025", "md5sum": "d58551313ae91498c0b0ba804df1066e" }, "1.0.23": { From facf67213049814510c2aaaffda21d12211a59db Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 24 Jan 2025 01:54:43 +0530 Subject: [PATCH 84/84] oops --- CHANGELOG.md | 2 +- index.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30da0e8..880f215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Plugin Manager (dd-mm-yyyy) -### 1.1.0 (24-01-2025) +### 1.1.0 (23-01-2025) - Updated to bombsquad api 9. diff --git a/index.json b/index.json index 18fa305..ee77c83 100644 --- a/index.json +++ b/index.json @@ -4,7 +4,7 @@ "1.1.0": { "api_version": 9, "commit_sha": "4b39a24", - "released_on": "24-01-2025", + "released_on": "23-01-2025", "md5sum": "d58551313ae91498c0b0ba804df1066e" }, "1.0.23": {