mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
[ci] auto-format
This commit is contained in:
parent
0fd7c5bed1
commit
4941d0cb0e
3 changed files with 566 additions and 561 deletions
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#Ported by brostos to api 8
|
||||
# Ported by brostos to api 8
|
||||
# ba_meta require api 8
|
||||
# (see https://ballistica.net/wiki/meta-tag-system)
|
||||
|
||||
|
|
@ -73,8 +73,8 @@ class Icon(Icon):
|
|||
shadow: float = 1.0,
|
||||
dead: bool = False,
|
||||
):
|
||||
super().__init__(player,position,scale,show_lives,show_death,
|
||||
name_scale,name_maxwidth,flatness,shadow)
|
||||
super().__init__(player, position, scale, show_lives, show_death,
|
||||
name_scale, name_maxwidth, flatness, shadow)
|
||||
if dead:
|
||||
self._name_text.opacity = 0.2
|
||||
self.node.color = (0.7, 0.3, 0.3)
|
||||
|
|
@ -111,6 +111,7 @@ class Player(bs.Player['Team']):
|
|||
self.dead = False
|
||||
self.icons: list[Icon] = []
|
||||
|
||||
|
||||
class Team(bs.Team[Player]):
|
||||
"""Our team type for this game."""
|
||||
|
||||
|
|
@ -230,7 +231,7 @@ class FlagDayGame(bs.TeamGameActivity[Player, Team]):
|
|||
'color': (0, 0.2, 0),
|
||||
'shadow': 1.0,
|
||||
'flatness': 1.0,
|
||||
'position': (0,0),
|
||||
'position': (0, 0),
|
||||
'scale': 0.8,
|
||||
'text': credits
|
||||
})
|
||||
|
|
@ -325,8 +326,8 @@ class FlagDayGame(bs.TeamGameActivity[Player, Team]):
|
|||
self.bomb_survivor = self.prize_recipient
|
||||
bs.broadcastmessage(bomb_rain, color=(1.0, 0.5, 0.16))
|
||||
# Set positions for the bombs to drop
|
||||
for bzz in range(-5,6):
|
||||
for azz in range(-5,2):
|
||||
for bzz in range(-5, 6):
|
||||
for azz in range(-5, 2):
|
||||
# for each position make a bomb drop there
|
||||
self.make_bomb(bzz, azz)
|
||||
self.give_points_timer = bs.Timer(3.3, self.give_points)
|
||||
|
|
@ -415,7 +416,7 @@ class FlagDayGame(bs.TeamGameActivity[Player, Team]):
|
|||
def make_health_box(self, position: Sequence[float]) -> None:
|
||||
if position == (0.0, 3.0, 0.0):
|
||||
position = (random.randint(-6, 6), 6, random.randint(-6, 4))
|
||||
elif position == (0,0,0):
|
||||
elif position == (0, 0, 0):
|
||||
position = random.choice(
|
||||
((-7, 6, -5), (7, 6, -5), (-7, 6, 1), (7, 6, 1)))
|
||||
self.health_box = PowerupBox(
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ if TYPE_CHECKING:
|
|||
class BotsCanAcceptPowerupsPlugin(babase.Plugin):
|
||||
def on_app_running(self) -> None:
|
||||
SpazBot.oldinit = SpazBot.__init__
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.oldinit()
|
||||
pam = PowerupBoxFactory.get().powerup_accept_material
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Configs = {
|
|||
"SuperPunch": False,
|
||||
"ImpactOnly": False,
|
||||
"StickyOnly": False,
|
||||
"IceOnly" : False,
|
||||
"IceOnly": False,
|
||||
"Infinite Bombs": False,
|
||||
"More Are Coming": False,
|
||||
"Credits": False,
|
||||
|
|
@ -235,7 +235,7 @@ class CheatMenuWindow(bui.Window):
|
|||
color=(1, 0, 0))
|
||||
elif change == False and config == "SuperPunch":
|
||||
bui.screenmessage("Super Punch Deactivated",
|
||||
color=(0.5,0,0))
|
||||
color=(0.5, 0, 0))
|
||||
update_config(config, change)
|
||||
bui.getsound('gunCocking').play()
|
||||
except Exception:
|
||||
|
|
@ -317,6 +317,7 @@ def ishost():
|
|||
if player.inputdevice.client_id == -1:
|
||||
return True
|
||||
|
||||
|
||||
def activity_loop():
|
||||
if bs.get_foreground_host_activity() is not None:
|
||||
activity = bs.get_foreground_host_activity()
|
||||
|
|
@ -340,7 +341,7 @@ def activity_loop():
|
|||
player.actor.bomb_type = 'ice'
|
||||
elif not config["IceOnly"]:
|
||||
player.actor.bomb_type = 'normal'
|
||||
player.actor.bomb_count= 1
|
||||
player.actor.bomb_count = 1
|
||||
|
||||
if config["ImpactOnly"]:
|
||||
player.actor.bomb_type = 'impact'
|
||||
|
|
@ -352,4 +353,6 @@ def activity_loop():
|
|||
|
||||
if config["Infinite Bombs"]:
|
||||
player.actor.bomb_count = 100
|
||||
timer = babase.AppTimer(2, activity_loop,repeat=True)
|
||||
|
||||
|
||||
timer = babase.AppTimer(2, activity_loop, repeat=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue