mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
[ci] auto-format
This commit is contained in:
parent
3f65846527
commit
7dcf3c711e
9 changed files with 553 additions and 564 deletions
|
|
@ -1,18 +1,20 @@
|
|||
# Ported by your friend: Freaku
|
||||
|
||||
#Join BCS:
|
||||
# Join BCS:
|
||||
# https://discord.gg/ucyaesh
|
||||
|
||||
|
||||
#My GitHub:
|
||||
# My GitHub:
|
||||
# https://github.com/Freaku17/BombSquad-Mods-byFreaku
|
||||
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
from __future__ import annotations
|
||||
from typing import TYPE_CHECKING
|
||||
import _babase, babase, random, math
|
||||
import _babase
|
||||
import babase
|
||||
import random
|
||||
import math
|
||||
import bauiv1 as bui
|
||||
import bascenev1 as bs
|
||||
from bascenev1lib.gameutils import SharedObjects
|
||||
|
|
@ -110,7 +112,8 @@ class Floater(bs.Actor):
|
|||
})
|
||||
self.node.connectattr('position', self.node2, 'position')
|
||||
|
||||
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 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():
|
||||
|
|
@ -186,7 +189,8 @@ class Floater(bs.Actor):
|
|||
np = self.node.position
|
||||
except:
|
||||
np = (0, 0, 0)
|
||||
self.b = Bomb(bomb_type=random.choice(['normal', 'ice', 'sticky', 'impact', 'land_mine', 'tnt']), source_player=self.source_player, position=(np[0], np[1] - 1, np[2]), velocity=(0, -1, 0)).autoretain()
|
||||
self.b = Bomb(bomb_type=random.choice(['normal', 'ice', 'sticky', 'impact', 'land_mine', 'tnt']),
|
||||
source_player=self.source_player, position=(np[0], np[1] - 1, np[2]), velocity=(0, -1, 0)).autoretain()
|
||||
if self.b.bomb_type in ['impact', 'land_mine']:
|
||||
self.b.arm()
|
||||
|
||||
|
|
@ -198,7 +202,7 @@ class Floater(bs.Actor):
|
|||
pn = self.node.position
|
||||
dist = self.distance(pn[0], pn[1], pn[2], px, py, pz)
|
||||
self.node.velocity = ((px - pn[0]) / dist, (py - pn[1]) / dist, (pz - pn[2]) / dist)
|
||||
bs.timer(dist-1, bs.WeakCall(self.move)) #suppress_format_warning=True)
|
||||
bs.timer(dist-1, bs.WeakCall(self.move)) # suppress_format_warning=True)
|
||||
|
||||
def handlemessage(self, msg):
|
||||
if isinstance(msg, bs.DieMessage):
|
||||
|
|
@ -211,21 +215,21 @@ class Floater(bs.Actor):
|
|||
super().handlemessage(msg)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def assignFloInputs(clientID: int):
|
||||
activity = bs.get_foreground_host_activity()
|
||||
with activity.context:
|
||||
if not hasattr(activity, 'flo') or not activity.flo.node.exists():
|
||||
try: activity.flo = Floater(activity.map.get_def_bound_box('map_bounds'))
|
||||
except: return #Perhaps using in main-menu/score-screen
|
||||
try:
|
||||
activity.flo = Floater(activity.map.get_def_bound_box('map_bounds'))
|
||||
except:
|
||||
return # Perhaps using in main-menu/score-screen
|
||||
floater = activity.flo
|
||||
if floater.controlled:
|
||||
bs.broadcastmessage('Floater is already being controlled', color=(1, 0, 0), transient=True, clients=[clientID])
|
||||
bs.broadcastmessage('Floater is already being controlled',
|
||||
color=(1, 0, 0), transient=True, clients=[clientID])
|
||||
return
|
||||
bs.broadcastmessage('You Gained Control Over The Floater!\n Press Bomb to Throw Bombs and Punch to leave!', clients=[clientID], transient=True, color=(0, 1, 1))
|
||||
bs.broadcastmessage('You Gained Control Over The Floater!\n Press Bomb to Throw Bombs and Punch to leave!', clients=[
|
||||
clientID], transient=True, color=(0, 1, 1))
|
||||
|
||||
for i in activity.players:
|
||||
if i.sessionplayer.inputdevice.client_id == clientID:
|
||||
|
|
@ -259,20 +263,32 @@ bui.set_party_icon_always_visible(True)
|
|||
|
||||
|
||||
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':
|
||||
try: assignFloInputs(-1)
|
||||
except: pass
|
||||
try:
|
||||
assignFloInputs(-1)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
bs.chatmessage = new_chat_message
|
||||
|
||||
# ba_meta export plugin
|
||||
|
||||
|
||||
class byFreaku(babase.Plugin):
|
||||
def __init__(self): pass
|
||||
def __init__(self): pass
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
# Double tap the space to change between keyboards...
|
||||
|
||||
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -19,12 +17,7 @@ import bascenev1 as bs
|
|||
from babase import charstr as uwu
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Any, Optional, Dict, List, Tuple,Type, Iterable
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
from typing import Any, Optional, Dict, List, Tuple, Type, Iterable
|
||||
|
||||
|
||||
# ba_meta export keyboard
|
||||
|
|
@ -32,33 +25,33 @@ class IconKeyboard_byFreaku(babase.Keyboard):
|
|||
"""Keyboard go brrrrrrr"""
|
||||
name = 'Icons by \ue048Freaku'
|
||||
chars = [(uwu(babase.SpecialChar.TICKET),
|
||||
uwu(babase.SpecialChar.CROWN),
|
||||
uwu(babase.SpecialChar.DRAGON),
|
||||
uwu(babase.SpecialChar.SKULL),
|
||||
uwu(babase.SpecialChar.HEART),
|
||||
uwu(babase.SpecialChar.FEDORA),
|
||||
uwu(babase.SpecialChar.HAL),
|
||||
uwu(babase.SpecialChar.YIN_YANG),
|
||||
uwu(babase.SpecialChar.EYE_BALL),
|
||||
uwu(babase.SpecialChar.HELMET),
|
||||
uwu(babase.SpecialChar.OUYA_BUTTON_U)),
|
||||
(uwu(babase.SpecialChar.MUSHROOM),
|
||||
uwu(babase.SpecialChar.NINJA_STAR),
|
||||
uwu(babase.SpecialChar.VIKING_HELMET),
|
||||
uwu(babase.SpecialChar.MOON),
|
||||
uwu(babase.SpecialChar.SPIDER),
|
||||
uwu(babase.SpecialChar.FIREBALL),
|
||||
uwu(babase.SpecialChar.MIKIROG),
|
||||
uwu(babase.SpecialChar.OUYA_BUTTON_O),
|
||||
uwu(babase.SpecialChar.LOCAL_ACCOUNT),
|
||||
uwu(babase.SpecialChar.LOGO)),
|
||||
(uwu(babase.SpecialChar.TICKET),
|
||||
uwu(babase.SpecialChar.FLAG_INDIA),
|
||||
uwu(babase.SpecialChar.OCULUS_LOGO),
|
||||
uwu(babase.SpecialChar.STEAM_LOGO),
|
||||
uwu(babase.SpecialChar.NVIDIA_LOGO),
|
||||
uwu(babase.SpecialChar.GAME_CENTER_LOGO),
|
||||
uwu(babase.SpecialChar.GOOGLE_PLAY_GAMES_LOGO),
|
||||
uwu(babase.SpecialChar.EXPLODINARY_LOGO))]
|
||||
uwu(babase.SpecialChar.CROWN),
|
||||
uwu(babase.SpecialChar.DRAGON),
|
||||
uwu(babase.SpecialChar.SKULL),
|
||||
uwu(babase.SpecialChar.HEART),
|
||||
uwu(babase.SpecialChar.FEDORA),
|
||||
uwu(babase.SpecialChar.HAL),
|
||||
uwu(babase.SpecialChar.YIN_YANG),
|
||||
uwu(babase.SpecialChar.EYE_BALL),
|
||||
uwu(babase.SpecialChar.HELMET),
|
||||
uwu(babase.SpecialChar.OUYA_BUTTON_U)),
|
||||
(uwu(babase.SpecialChar.MUSHROOM),
|
||||
uwu(babase.SpecialChar.NINJA_STAR),
|
||||
uwu(babase.SpecialChar.VIKING_HELMET),
|
||||
uwu(babase.SpecialChar.MOON),
|
||||
uwu(babase.SpecialChar.SPIDER),
|
||||
uwu(babase.SpecialChar.FIREBALL),
|
||||
uwu(babase.SpecialChar.MIKIROG),
|
||||
uwu(babase.SpecialChar.OUYA_BUTTON_O),
|
||||
uwu(babase.SpecialChar.LOCAL_ACCOUNT),
|
||||
uwu(babase.SpecialChar.LOGO)),
|
||||
(uwu(babase.SpecialChar.TICKET),
|
||||
uwu(babase.SpecialChar.FLAG_INDIA),
|
||||
uwu(babase.SpecialChar.OCULUS_LOGO),
|
||||
uwu(babase.SpecialChar.STEAM_LOGO),
|
||||
uwu(babase.SpecialChar.NVIDIA_LOGO),
|
||||
uwu(babase.SpecialChar.GAME_CENTER_LOGO),
|
||||
uwu(babase.SpecialChar.GOOGLE_PLAY_GAMES_LOGO),
|
||||
uwu(babase.SpecialChar.EXPLODINARY_LOGO))]
|
||||
nums = []
|
||||
pages: Dict[str, Tuple[str, ...]] = {}
|
||||
pages: Dict[str, Tuple[str, ...]] = {}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ def new_play_types(cls):
|
|||
# ba_meta export plugin
|
||||
class byFreaku(babase.Plugin):
|
||||
def on_app_running(self):
|
||||
TowerD.get_play_types = new_play_types
|
||||
TowerD.get_play_types = new_play_types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue