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
6bf4dae698
commit
2e2540ae5b
1 changed files with 8 additions and 10 deletions
|
|
@ -30,9 +30,7 @@ class State:
|
||||||
self.next = None
|
self.next = None
|
||||||
self.index = None
|
self.index = None
|
||||||
|
|
||||||
|
def apply(self, player, spaz):
|
||||||
|
|
||||||
def apply(self, player,spaz):
|
|
||||||
|
|
||||||
spaz.disconnect_controls_from_player()
|
spaz.disconnect_controls_from_player()
|
||||||
spaz.connect_controls_to_player(enable_punch=self.punch,
|
spaz.connect_controls_to_player(enable_punch=self.punch,
|
||||||
|
|
@ -46,10 +44,10 @@ class State:
|
||||||
spaz.set_score_text(self.name)
|
spaz.set_score_text(self.name)
|
||||||
|
|
||||||
def set_controls():
|
def set_controls():
|
||||||
player.actor.node.bomb_pressed=True
|
player.actor.node.bomb_pressed = True
|
||||||
player.actor.on_bomb_release()
|
player.actor.on_bomb_release()
|
||||||
|
|
||||||
release_input=(ba.InputType.PUNCH_RELEASE,ba.InputType.PICK_UP_RELEASE)
|
release_input = (ba.InputType.PUNCH_RELEASE, ba.InputType.PICK_UP_RELEASE)
|
||||||
if not self.bomb is None:
|
if not self.bomb is None:
|
||||||
for release in release_input:
|
for release in release_input:
|
||||||
player.assigninput(
|
player.assigninput(
|
||||||
|
|
@ -169,14 +167,13 @@ class ArmsRaceGame(ba.TeamGameActivity[Player, Team]):
|
||||||
player.state = self.states[0]
|
player.state = self.states[0]
|
||||||
self.spawn_player(player)
|
self.spawn_player(player)
|
||||||
|
|
||||||
|
|
||||||
# overriding the default character spawning..
|
# overriding the default character spawning..
|
||||||
|
|
||||||
def spawn_player(self, player):
|
def spawn_player(self, player):
|
||||||
if player.state is None:
|
if player.state is None:
|
||||||
player.state = self.states[0]
|
player.state = self.states[0]
|
||||||
super().spawn_player(player)
|
super().spawn_player(player)
|
||||||
player.state.apply(player,player.actor)
|
player.state.apply(player, player.actor)
|
||||||
|
|
||||||
|
|
||||||
def isValidKill(self, m):
|
def isValidKill(self, m):
|
||||||
if m.getkillerplayer(Player) is None:
|
if m.getkillerplayer(Player) is None:
|
||||||
|
|
@ -194,7 +191,8 @@ class ArmsRaceGame(ba.TeamGameActivity[Player, Team]):
|
||||||
self.stats.player_scored(msg.getkillerplayer(Player), 10, kill=True)
|
self.stats.player_scored(msg.getkillerplayer(Player), 10, kill=True)
|
||||||
if not msg.getkillerplayer(Player).state.final:
|
if not msg.getkillerplayer(Player).state.final:
|
||||||
msg.getkillerplayer(Player).state = msg.getkillerplayer(Player).state.next
|
msg.getkillerplayer(Player).state = msg.getkillerplayer(Player).state.next
|
||||||
msg.getkillerplayer(Player).state.apply(msg.getkillerplayer(Player),msg.getkillerplayer(Player).actor)
|
msg.getkillerplayer(Player).state.apply(
|
||||||
|
msg.getkillerplayer(Player), msg.getkillerplayer(Player).actor)
|
||||||
else:
|
else:
|
||||||
msg.getkillerplayer(Player).team.score += 1
|
msg.getkillerplayer(Player).team.score += 1
|
||||||
self.end_game()
|
self.end_game()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue