This commit is contained in:
Jonas Zeunert
2022-08-31 15:20:03 +02:00
parent 0ef881bb91
commit a75d57f594
2 changed files with 4 additions and 2 deletions

View File

@@ -290,8 +290,9 @@ class PlayerState:
if not self.isActive:
return
self.replayBall = True
self.replayBallTimer = Timer(interval=1, function=self.updateReplayBall)
if self.ballsleft == 0 and self.bonusTime != 0:
self.replayBall = True
self.replayBallTimer = Timer(interval=1, function=self.updateReplayBall)
def updateReplayBall(self):
self.bonusTime -= 1

View File

@@ -23,6 +23,7 @@ class EndBallEvent(Event):
TopFlipper().deactivate()
MainFlipper().deactivate()
self.gameState.currentPlayer.setReplayBall()
if self.gameState.currentPlayer.replayBall or not self.gameState.currentPlayer.hasBallScored:
OutHoleSolenoid().trigger()
return