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
e3203684bb
commit
eb7e05ad72
1 changed files with 13 additions and 14 deletions
|
|
@ -30,7 +30,6 @@ class State:
|
|||
self.next = None
|
||||
self.index = None
|
||||
|
||||
|
||||
def apply(self, spaz):
|
||||
spaz.disconnect_controls_from_player()
|
||||
spaz.connect_controls_to_player(enable_punch=self.punch,
|
||||
|
|
@ -155,17 +154,17 @@ class ArmsRaceGame(ba.TeamGameActivity[Player, Team]):
|
|||
player.state = self.states[0]
|
||||
self.spawn_player(player)
|
||||
|
||||
def idk(self,spaz:PlayerSpaz):
|
||||
def idk(self, spaz: PlayerSpaz):
|
||||
|
||||
return {"press":{
|
||||
ba.InputType.PUNCH_PRESS : spaz.on_punch_press,
|
||||
ba.InputType.PICK_UP_PRESS : spaz.on_pickup_press,},
|
||||
"release":{
|
||||
ba.InputType.PUNCH_RELEASE : spaz.on_punch_release,
|
||||
ba.InputType.PICK_UP_RELEASE : spaz.on_pickup_release}
|
||||
}
|
||||
return {"press": {
|
||||
ba.InputType.PUNCH_PRESS: spaz.on_punch_press,
|
||||
ba.InputType.PICK_UP_PRESS: spaz.on_pickup_press, },
|
||||
"release": {
|
||||
ba.InputType.PUNCH_RELEASE: spaz.on_punch_release,
|
||||
ba.InputType.PICK_UP_RELEASE: spaz.on_pickup_release}
|
||||
}
|
||||
|
||||
def set_controls(self,spaz:PlayerSpaz,):
|
||||
def set_controls(self, spaz: PlayerSpaz,):
|
||||
spaz.on_punch_press()
|
||||
|
||||
# overriding the default character spawning..
|
||||
|
|
@ -175,13 +174,13 @@ class ArmsRaceGame(ba.TeamGameActivity[Player, Team]):
|
|||
super().spawn_player(player)
|
||||
player.state.apply(player.actor)
|
||||
|
||||
press_input=self.idk(player.actor)["press"]
|
||||
release_input=self.idk(player.actor)["release"]
|
||||
press_input = self.idk(player.actor)["press"]
|
||||
release_input = self.idk(player.actor)["release"]
|
||||
|
||||
for press,release in zip(press_input.keys(),release_input.keys()):
|
||||
for press, release in zip(press_input.keys(), release_input.keys()):
|
||||
player.assigninput(
|
||||
press,
|
||||
lambda : player.actor.on_bomb_press()
|
||||
lambda: player.actor.on_bomb_press()
|
||||
)
|
||||
player.assigninput(
|
||||
release,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue