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
27bb489a1f
commit
21821c0328
1 changed files with 89 additions and 82 deletions
|
|
@ -2,16 +2,13 @@
|
||||||
# Ported by: MysteriousBoi
|
# Ported by: MysteriousBoi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ba_meta require api 8
|
# ba_meta require api 8
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
import babase
|
import babase
|
||||||
import bauiv1 as bui
|
import bauiv1 as bui
|
||||||
import bascenev1 as bs,random
|
import bascenev1 as bs
|
||||||
|
import random
|
||||||
from bascenev1lib.actor.playerspaz import PlayerSpaz
|
from bascenev1lib.actor.playerspaz import PlayerSpaz
|
||||||
from bascenev1lib.actor.scoreboard import Scoreboard
|
from bascenev1lib.actor.scoreboard import Scoreboard
|
||||||
from bascenev1lib.actor.powerupbox import PowerupBoxFactory
|
from bascenev1lib.actor.powerupbox import PowerupBoxFactory
|
||||||
|
|
@ -28,6 +25,8 @@ class PuckDiedMessage:
|
||||||
self.puck = puck
|
self.puck = puck
|
||||||
|
|
||||||
# goalpost
|
# goalpost
|
||||||
|
|
||||||
|
|
||||||
class FlagKale(bs.Actor):
|
class FlagKale(bs.Actor):
|
||||||
def __init__(self, position=(0, 2.5, 0), color=(1, 1, 1)):
|
def __init__(self, position=(0, 2.5, 0), color=(1, 1, 1)):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
@ -115,6 +114,8 @@ class Puck(bs.Actor):
|
||||||
super().handlemessage(msg)
|
super().handlemessage(msg)
|
||||||
|
|
||||||
# for night mode: using a actor with large shadow and little mesh scale. Better then tint i think, players and objects more visible
|
# for night mode: using a actor with large shadow and little mesh scale. Better then tint i think, players and objects more visible
|
||||||
|
|
||||||
|
|
||||||
class NightMod(bs.Actor):
|
class NightMod(bs.Actor):
|
||||||
def __init__(self, position=(0, 0, 0)):
|
def __init__(self, position=(0, 0, 0)):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
@ -307,7 +308,8 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
|
||||||
self._puck_spawn_pos = self.map.get_flag_position(None)
|
self._puck_spawn_pos = self.map.get_flag_position(None)
|
||||||
self._spawn_puck()
|
self._spawn_puck()
|
||||||
# for night mode we need night actor. And same goodies for nigh mode
|
# for night mode we need night actor. And same goodies for nigh mode
|
||||||
if self._nm: self._nightSpawny(),self._flagKaleFlash()
|
if self._nm:
|
||||||
|
self._nightSpawny(), self._flagKaleFlash()
|
||||||
|
|
||||||
# Set up the two score regions.
|
# Set up the two score regions.
|
||||||
defs = self.map.defs
|
defs = self.map.defs
|
||||||
|
|
@ -364,6 +366,7 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
|
||||||
'radius': 0.15,
|
'radius': 0.15,
|
||||||
'color': (0.7, 1.0, 1.0)})
|
'color': (0.7, 1.0, 1.0)})
|
||||||
# flags positions
|
# flags positions
|
||||||
|
|
||||||
def _flagKalesSpawn(self):
|
def _flagKalesSpawn(self):
|
||||||
for team in self.teams:
|
for team in self.teams:
|
||||||
if team.id == 0:
|
if team.id == 0:
|
||||||
|
|
@ -419,8 +422,10 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
|
||||||
# tell scored team players to celebrate and give them to boxing gloves
|
# tell scored team players to celebrate and give them to boxing gloves
|
||||||
if self._grant_power:
|
if self._grant_power:
|
||||||
for player in team.players:
|
for player in team.players:
|
||||||
try: player.actor.node.handlemessage(bs.PowerupMessage('punch'))
|
try:
|
||||||
except: pass
|
player.actor.node.handlemessage(bs.PowerupMessage('punch'))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# Tell all players to celebrate.
|
# Tell all players to celebrate.
|
||||||
for player in team.players:
|
for player in team.players:
|
||||||
|
|
@ -442,8 +447,10 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
|
||||||
else:
|
else:
|
||||||
if self._grant_power:
|
if self._grant_power:
|
||||||
for player in team.players:
|
for player in team.players:
|
||||||
try: player.actor.node.handlemessage(bs.PowerupMessage('shield'))
|
try:
|
||||||
except: pass
|
player.actor.node.handlemessage(bs.PowerupMessage('shield'))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
self._foghorn_sound.play()
|
self._foghorn_sound.play()
|
||||||
self._cheer_sound.play()
|
self._cheer_sound.play()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue