mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
[ci] auto-format
This commit is contained in:
parent
b5d4f409ec
commit
bdcb21a4ec
1 changed files with 24 additions and 15 deletions
|
|
@ -92,6 +92,8 @@ class PlayerState(Enum):
|
|||
|
||||
# I added some variety by giving Marked player unique bomb types.
|
||||
# This enum makes it easier to keep track of them.
|
||||
|
||||
|
||||
class MarkedBombTypes(Enum):
|
||||
REGULAR = 0
|
||||
IMPACT = 1
|
||||
|
|
@ -255,6 +257,7 @@ class Icon(ba.Actor):
|
|||
# Bombs work as intended... with the exception of one mechanic.
|
||||
# We have to patch it out.
|
||||
|
||||
|
||||
class PotatoBomb(Bomb):
|
||||
|
||||
# Same function as before with bomb ownership passing code removed
|
||||
|
|
@ -295,10 +298,12 @@ class PotatoBomb(Bomb):
|
|||
if msg.srcnode:
|
||||
pass
|
||||
|
||||
|
||||
class FootConnectMessage(object):
|
||||
'Player stands on ground'
|
||||
pass
|
||||
|
||||
|
||||
class FootDisconnectMessage(object):
|
||||
'Player stops touching the ground'
|
||||
pass
|
||||
|
|
@ -388,7 +393,8 @@ class PotatoPlayerSpaz(PlayerSpaz):
|
|||
_marked = self.node.source_player.state == PlayerState.MARKED
|
||||
if not _marked and _holding_someone:
|
||||
self._able_to_pickup = False
|
||||
self._pickup_timer = ba.Timer(self._pickup_cooldown, ba.WeakCall(self._on_pickup_timer_timeout))
|
||||
self._pickup_timer = ba.Timer(
|
||||
self._pickup_cooldown, ba.WeakCall(self._on_pickup_timer_timeout))
|
||||
self.node.pickup_pressed = True
|
||||
self.last_pickup_time_ms = t_ms
|
||||
|
||||
|
|
@ -745,7 +751,8 @@ class Player(ba.Player['Team']):
|
|||
if old_state != PlayerState.STUNNED and state == PlayerState.STUNNED:
|
||||
|
||||
# Let's set our stun time based on the amount of times we fell out of the map.
|
||||
fall_penalties_table = LENIENT_FALL_PENALTIES if self.actor.getactivity().lenient_fall_penalties else FALL_PENALTIES
|
||||
fall_penalties_table = LENIENT_FALL_PENALTIES if self.actor.getactivity(
|
||||
).lenient_fall_penalties else FALL_PENALTIES
|
||||
if self.fall_times < len(fall_penalties_table):
|
||||
stun_time = fall_penalties_table[self.fall_times]
|
||||
else:
|
||||
|
|
@ -960,7 +967,8 @@ class HotPotato(ba.TeamGameActivity[Player, ba.Team]):
|
|||
|
||||
# Change their bomb type depending on the variant
|
||||
if self.settings['Marked Player Bomb'] == MarkedBombTypes.IMPACT.value:
|
||||
target.actor.blast_radius /= IMPACT_BOMB_RADIUS_SCALE # Increase blast radius of impact bombs to be on par with normal bombs
|
||||
# Increase blast radius of impact bombs to be on par with normal bombs
|
||||
target.actor.blast_radius /= IMPACT_BOMB_RADIUS_SCALE
|
||||
target.actor.bomb_type = 'impact'
|
||||
elif self.settings['Marked Player Bomb'] == MarkedBombTypes.STICKY.value:
|
||||
target.actor.bomb_type = 'sticky'
|
||||
|
|
@ -1303,7 +1311,8 @@ class HotPotato(ba.TeamGameActivity[Player, ba.Team]):
|
|||
for _i in range(10):
|
||||
for box in self.map.ffa_spawn_points:
|
||||
point = _getpt()
|
||||
avg_distance = sum((player_pt - ba.Vec3(point[0], point[1], point[2])).length() for player_pt in player_pts) / len(player_pts)
|
||||
avg_distance = sum(
|
||||
(player_pt - ba.Vec3(point[0], point[1], point[2])).length() for player_pt in player_pts) / len(player_pts)
|
||||
distance_diff = abs(avg_distance - target_distance)
|
||||
if distance_diff < best_distance_diff:
|
||||
best_distance_diff = distance_diff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue