mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-08 08:45:43 +08:00
preflight doing preflight things
This commit is contained in:
parent
d1defe0558
commit
3384960314
@ -522,12 +522,13 @@ class CaptureTheFlagGame(bs.TeamGameActivity[Player, Team]):
|
|||||||
def _handle_death_flag_capture(self, player: Player) -> None:
|
def _handle_death_flag_capture(self, player: Player) -> None:
|
||||||
"""Handles flag values when a player dies or leaves the game."""
|
"""Handles flag values when a player dies or leaves the game."""
|
||||||
# Don't do anything if the player hasn't touched the flag at all.
|
# Don't do anything if the player hasn't touched the flag at all.
|
||||||
if not player.touching_own_flag: return
|
if not player.touching_own_flag:
|
||||||
|
return
|
||||||
|
|
||||||
team = player.team
|
team = player.team
|
||||||
# For each "point" our player has touched the flag (Could be multiple),
|
# For each "point" our player has touched the flag (Could be multiple),
|
||||||
# deduct one from both our player and the flag's return touches variable.
|
# deduct one from both our player and the flag's return touches variable.
|
||||||
for _ in range(player.touching_own_flag):
|
for _ in range(player.touching_own_flag):
|
||||||
# Deduct
|
# Deduct
|
||||||
player.touching_own_flag -= 1
|
player.touching_own_flag -= 1
|
||||||
team.flag_return_touches -= 1
|
team.flag_return_touches -= 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user