[ci] auto-format

This commit is contained in:
SenjuZoro 2023-08-22 00:51:19 +00:00 committed by github-actions[bot]
parent 27d77b6afd
commit 47a1ca8c54

View file

@ -53,9 +53,11 @@ else:
slowest = 'Slowest' slowest = 'Slowest'
insane = 'Insane' insane = 'Insane'
def ba_get_api_version(): def ba_get_api_version():
return 6 return 6
def ba_get_levels(): def ba_get_levels():
return [babase._level.Level( return [babase._level.Level(
name, name,
@ -63,6 +65,7 @@ def ba_get_levels():
settings={}, settings={},
preview_texture_name='footballStadiumPreview')] preview_texture_name='footballStadiumPreview')]
class myMine(Bomb): class myMine(Bomb):
# reason for the mine class is so we can add the death zone # reason for the mine class is so we can add the death zone
def __init__(self, def __init__(self,
@ -101,12 +104,15 @@ class myMine(Bomb):
else: else:
super().handlemessage(msg) super().handlemessage(msg)
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.survival_seconds: Optional[int] = None self.survival_seconds: Optional[int] = None
self.death_time: Optional[float] = None self.death_time: Optional[float] = None
class Team(bs.Team[Player]): class Team(bs.Team[Player]):
"""Our team type for this game.""" """Our team type for this game."""
@ -122,7 +128,6 @@ class Infection(bs.TeamGameActivity[Player, Team]):
announce_player_deaths = True announce_player_deaths = True
allow_mid_activity_joins = False allow_mid_activity_joins = False
@classmethod @classmethod
def get_available_settings( def get_available_settings(
cls, sessiontype: Type[bs.Session]) -> List[babase.Setting]: cls, sessiontype: Type[bs.Session]) -> List[babase.Setting]:
@ -436,7 +441,8 @@ class Infection(bs.TeamGameActivity[Player, Team]):
while True: while True:
x = random.uniform(-1.0, 1.0) x = random.uniform(-1.0, 1.0)
y = random.uniform(-1.0, 1.0) y = random.uniform(-1.0, 1.0)
if x*x+y*y < 1.0: break if x*x+y*y < 1.0:
break
return ((8.0*x, 2.5, -3.5+5.0*y)) return ((8.0*x, 2.5, -3.5+5.0*y))
elif myMap == 'Rampage': elif myMap == 'Rampage':
x = random.uniform(-6.0, 7.0) x = random.uniform(-6.0, 7.0)