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
12d51c3b1d
commit
2b046cb433
1 changed files with 45 additions and 37 deletions
|
|
@ -27,12 +27,15 @@ if TYPE_CHECKING:
|
|||
class TouchedToSpaz(object):
|
||||
pass
|
||||
|
||||
|
||||
class TouchedToAnything(object):
|
||||
pass
|
||||
|
||||
|
||||
class TouchedToFootingMaterial(object):
|
||||
pass
|
||||
|
||||
|
||||
class QuakeBallFactory(object):
|
||||
"""Components used by QuakeBall stuff
|
||||
|
||||
|
|
@ -40,6 +43,7 @@ class QuakeBallFactory(object):
|
|||
|
||||
"""
|
||||
_STORENAME = babase.storagename()
|
||||
|
||||
@classmethod
|
||||
def get(cls) -> QuakeBallFactory:
|
||||
"""Get/create a shared bascenev1lib.actor.bomb.BombFactory object."""
|
||||
|
|
@ -230,8 +234,6 @@ class QuakeBall(bs.Actor):
|
|||
super().handlemessage(m)
|
||||
|
||||
|
||||
|
||||
|
||||
class Player(bs.Player['Team']):
|
||||
...
|
||||
|
||||
|
|
@ -243,6 +245,8 @@ class Team(bs.Team[Player]):
|
|||
self.score = 0
|
||||
|
||||
# ba_meta export bascenev1.GameActivity
|
||||
|
||||
|
||||
class QuakeGame(bs.TeamGameActivity[Player, Team]):
|
||||
"""A game type based on acquiring kills."""
|
||||
|
||||
|
|
@ -391,9 +395,10 @@ class QuakeGame(bs.TeamGameActivity[Player, Team]):
|
|||
shape=int(self.settings['Obstacles Shape'])).autoretain()
|
||||
|
||||
if self.settings['Graphics'] == 2:
|
||||
bs.getactivity().globalsnode.tint = (bs.getactivity().globalsnode.tint[0]-0.6, bs.getactivity().globalsnode.tint[1]-0.6, bs.getactivity().globalsnode.tint[2]-0.6)
|
||||
bs.getactivity().globalsnode.tint = (bs.getactivity(
|
||||
).globalsnode.tint[0]-0.6, bs.getactivity().globalsnode.tint[1]-0.6, bs.getactivity().globalsnode.tint[2]-0.6)
|
||||
light = bs.newnode('light', attrs={
|
||||
'position': (9, 10, 0) if map == 'Football Stadium' else (6, 7, -2) \
|
||||
'position': (9, 10, 0) if map == 'Football Stadium' else (6, 7, -2)
|
||||
if not map == 'Rampage' else (6, 11, -2) if not map == 'The Pad' else (6, 8.5, -2),
|
||||
'color': (0.4, 0.4, 0.45),
|
||||
'radius': 1,
|
||||
|
|
@ -401,7 +406,7 @@ class QuakeGame(bs.TeamGameActivity[Player, Team]):
|
|||
'volume_intensity_scale': 10.0})
|
||||
|
||||
light2 = bs.newnode('light', attrs={
|
||||
'position': (-9, 10, 0) if map == 'Football Stadium' else (-6, 7, -2) \
|
||||
'position': (-9, 10, 0) if map == 'Football Stadium' else (-6, 7, -2)
|
||||
if not map == 'Rampage' else (-6, 11, -2) if not map == 'The Pad' else (-6, 8.5, -2),
|
||||
'color': (0.4, 0.4, 0.45),
|
||||
'radius': 1,
|
||||
|
|
@ -409,7 +414,8 @@ class QuakeGame(bs.TeamGameActivity[Player, Team]):
|
|||
'volume_intensity_scale': 10.0})
|
||||
|
||||
if len(self.teams) > 0:
|
||||
self._score_to_win = self.settings['Kills to Win Per Player']*max(1, max(len(t.players) for t in self.teams))
|
||||
self._score_to_win = self.settings['Kills to Win Per Player'] * \
|
||||
max(1, max(len(t.players) for t in self.teams))
|
||||
else:
|
||||
self._score_to_win = self.settings['Kills to Win Per Player']
|
||||
self._update_scoreboard()
|
||||
|
|
@ -461,7 +467,8 @@ class QuakeGame(bs.TeamGameActivity[Player, Team]):
|
|||
enable_run=True,
|
||||
enable_fly=False)
|
||||
|
||||
if self.settings['Fast Movespeed']: spaz.node.hockey = True
|
||||
if self.settings['Fast Movespeed']:
|
||||
spaz.node.hockey = True
|
||||
spaz.spaz_light = bs.newnode('light', attrs={
|
||||
'position': (0, 0, 0),
|
||||
'color': spaz.node.color,
|
||||
|
|
@ -542,6 +549,7 @@ class QuakeGame(bs.TeamGameActivity[Player, Team]):
|
|||
results.set_team_score(team, team.score)
|
||||
self.end(results=results)
|
||||
|
||||
|
||||
class Obstacle(bs.Actor):
|
||||
|
||||
def __init__(self,
|
||||
|
|
@ -590,7 +598,7 @@ class Obstacle(bs.Actor):
|
|||
if graphics == 2:
|
||||
self.light_node = bs.newnode('light', attrs={
|
||||
'position': (0, 0, 0),
|
||||
'color': ((0.8, 0.2, 0.2) if i < count/2 else (0.2, 0.2, 0.8)) \
|
||||
'color': ((0.8, 0.2, 0.2) if i < count/2 else (0.2, 0.2, 0.8))
|
||||
if not random_color else ((random.uniform(0, 1.1), random.uniform(0, 1.1), random.uniform(0, 1.1))),
|
||||
'radius': 0.2,
|
||||
'intensity': 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue