[ci] auto-format

This commit is contained in:
SenjuZoro 2023-07-27 21:28:52 +00:00 committed by github-actions[bot]
parent bff7e1c897
commit ab2678693d

View file

@ -60,6 +60,7 @@ class SuperSpaz(PlayerSpaz):
class Player(bs.Player['Team']): class Player(bs.Player['Team']):
"""Our player type for this game.""" """Our player type for this game."""
def __init__(self) -> None: def __init__(self) -> None:
self.icons: List[Icon] = [] self.icons: List[Icon] = []
self.in_game: bool = False self.in_game: bool = False
@ -103,6 +104,8 @@ else:
boxing_gloves = 'Boxing Gloves' boxing_gloves = 'Boxing Gloves'
# ba_meta export bascenev1.GameActivity # ba_meta export bascenev1.GameActivity
class NewDuelGame(bs.TeamGameActivity[Player, Team]): class NewDuelGame(bs.TeamGameActivity[Player, Team]):
"""A game type based on acquiring kills.""" """A game type based on acquiring kills."""
@ -249,8 +252,6 @@ class NewDuelGame(bs.TeamGameActivity[Player, Team]):
if len(self.players) == 1: if len(self.players) == 1:
'self.end_game()' 'self.end_game()'
def spawn_player(self, player: PlayerType) -> bs.Actor: def spawn_player(self, player: PlayerType) -> bs.Actor:
# pylint: disable=too-many-locals # pylint: disable=too-many-locals
# pylint: disable=cyclic-import # pylint: disable=cyclic-import
@ -301,12 +302,14 @@ class NewDuelGame(bs.TeamGameActivity[Player, Team]):
for x in self.players: for x in self.players:
if x.is_alive(): if x.is_alive():
if x is player: continue if x is player:
continue
p = x.actor.node.position p = x.actor.node.position
if 0.0 not in (p[0], p[2]): if 0.0 not in (p[0], p[2]):
if p[0] <= 0: if p[0] <= 0:
pos3.append(pos2[0]) pos3.append(pos2[0])
else: pos3.append(pos1[0]) else:
pos3.append(pos1[0])
spaz.handlemessage(bs.StandMessage(pos1[0] if player.playervs1 else pos2[0], spaz.handlemessage(bs.StandMessage(pos1[0] if player.playervs1 else pos2[0],
pos1[1] if player.playervs1 else pos2[1])) pos1[1] if player.playervs1 else pos2[1]))
@ -323,6 +326,7 @@ class NewDuelGame(bs.TeamGameActivity[Player, Team]):
'color': color, 'color': color,
'radius': 0.3, 'radius': 0.3,
'intensity': 0.3}) 'intensity': 0.3})
def sp_fx(): def sp_fx():
if not spaz.node: if not spaz.node:
lfx.delete() lfx.delete()