From 032ce46b902876c84ab43da6d09f724f22f67110 Mon Sep 17 00:00:00 2001 From: imAnesYT Date: Tue, 27 May 2025 23:36:24 +0100 Subject: [PATCH] Add files via upload --- plugins/utilities/infinite_impact_bombs.py | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 plugins/utilities/infinite_impact_bombs.py diff --git a/plugins/utilities/infinite_impact_bombs.py b/plugins/utilities/infinite_impact_bombs.py new file mode 100644 index 0000000..90a6c35 --- /dev/null +++ b/plugins/utilities/infinite_impact_bombs.py @@ -0,0 +1,47 @@ +# ba_meta require api 9 + +import babase +import bauiv1 as bui +import bauiv1lib.party +import bascenev1 as bs + + +class InfiniteImpactBombs(bauiv1lib.party.PartyWindow): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._bombs_enabled = False # Track bomb state + self._btn = bui.buttonwidget( + parent=self._root_widget, + size=(200, 50), + scale=0.7, + label="Toggle Impact Bombs", + button_type="square", + position=(self._width - 210, self._height - 50), + on_activate_call=self._toggle_bombs + ) + + def _toggle_bombs(self): + """Toggle infinite impact bombs for the player.""" + activity = bs.get_foreground_host_activity() + if activity is None or not hasattr(activity, "players"): + bui.screenmessage("No game running!", color=(1, 0, 0)) + return + + for player in activity.players: + if player and player.actor: + spaz = player.actor + if self._bombs_enabled: + spaz.bomb_type = "normal" + bui.screenmessage("Impact Bombs Disabled", color=(1, 0, 0)) + else: + spaz.bomb_type = "impact" + bui.screenmessage("Impact Bombs Enabled", color=(0, 1, 0)) + + self._bombs_enabled = not self._bombs_enabled + +# ba_meta export plugin + + +class ByANES(babase.Plugin): + def on_app_running(self): + bauiv1lib.party.PartyWindow = InfiniteImpactBombs