Rename & Update floater for 1.7.37+ (API 9)

• Removed base64 encoded popup (trusting the community that they won't change the name & steal credits)
• No longer requires a compulsive function to always show the party chat icon, hence, removed.
• Add the missing JUMP_RELEASE button
This commit is contained in:
! Freaku 2025-02-08 02:14:07 +05:30 committed by GitHub
parent 8d46d713bb
commit c7ecaff9d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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):
@ -113,8 +107,8 @@ class Floater(bs.Actor):
})
self.node.connectattr('position', self.node2, 'position')
import base64
exec(base64.b64decode("ZGVmIHBvcChzZWxmKTogUG9wdXBUZXh0KHRleHQ9IlBvcnRlZCBieSBcdWUwNDhGcmVha3UiLCBzY2FsZT0xLjMsIHBvc2l0aW9uPShzZWxmLm5vZGUucG9zaXRpb25bMF0sc2VsZi5ub2RlLnBvc2l0aW9uWzFdLTEsc2VsZi5ub2RlLnBvc2l0aW9uWzJdKSwgY29sb3I9KDAsMSwxKSkuYXV0b3JldGFpbigpICNFbmNvZGVkIGluIGJhc2U2NCBvbmx5IGN1eiBvZiBjcmVkaXQgc3RlYWxlci4uLg==").decode('UTF-8'))
def pop(self): PopupText(text="Ported by \ue048Freaku", scale=1.3, position=(
self.node.position[0], self.node.position[1]-1, self.node.position[2]), color=(0, 1, 1)).autoretain()
def checkCanControl(self):
if not self.node.exists():
@ -253,23 +247,13 @@ 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
@ -284,15 +268,7 @@ def new_chat_message(*args, **kwargs):
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
pass