Replace fallback name logic: use first active challenge instead

of game mode

Previously used game mode as the fallback name, updated to use the
first active challenge instead (e.g. Monogen or Mono Type), which
better reflects the run's theme.
Signed-off-by: Matheus Alves <matheus.r.noya.alves@tecnico.ulisboa.pt>
Co-authored-by: Inês Simões <ines.p.simoes@tecnico.ulisboa.pt>
This commit is contained in:
Matheus Alves 2025-06-29 13:17:14 +01:00
parent 116daa4baa
commit 428c175cb5

View File

@ -507,12 +507,16 @@ class SessionSlot extends Phaser.GameObjects.Container {
case GameModes.SPLICED_ENDLESS:
fallbackName = `${GameMode.getModeName(data.gameMode)} (${globalScene.gameData.gameStats.endlessSessionsPlayed + 1})`;
break;
case GameModes.DAILY:
case GameModes.DAILY: {
const runDay = new Date(data.timestamp).toLocaleDateString();
fallbackName = `${GameMode.getModeName(data.gameMode)} (${runDay})`;
break;
}
case GameModes.CHALLENGE:
fallbackName = `${GameMode.getModeName(data.gameMode)}`;
fallbackName = data.challenges
.find(c => c.value !== 0)
?.toChallenge()
.getName();
break;
}
return fallbackName;