Lost page

This commit is contained in:
Frank
2026-01-08 20:32:21 +01:00
parent c0fc0b8e6e
commit 2008a379a8
7 changed files with 293 additions and 4 deletions
+10
View File
@@ -391,6 +391,16 @@ final class GameDashboardService
if ($readyPlayersCount === $numPlayers) {
$session->setStatus(SessionStatus::PLAYING);
// Set the end timer
$game = $session->getGame();
/** @var \App\Game\Repository\GameSettingRepository $gameSettingRepo */
$gameSettingRepo = $this->entityManager->getRepository(\App\Game\Entity\GameSetting::class);
$totalTimeSetting = $gameSettingRepo->getSetting($game, \App\Game\Enum\GameSettingType::TOTAL_TIME);
$totalTime = $totalTimeSetting ? (int)$totalTimeSetting->getValue() : 3600; // Default to 60 minutes if not set
$session->setTimer((new \DateTime())->getTimestamp() + $totalTime);
$this->entityManager->persist($session);
// Clean up ready settings