Build 29058637

This commit is contained in:
Renan LE CARO 2025-04-01 16:37:34 +02:00
parent 19729d4599
commit b49abf9904
10 changed files with 40 additions and 20 deletions

View file

@ -1,5 +1,5 @@
// The version of the cache.
const VERSION = "29058469";
const VERSION = "29058637";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -3,7 +3,7 @@ import { allLevels, icons, upgrades } from "./loadGameData";
import { t } from "./i18n/i18n";
import { getSettingValue, getTotalScore, setSettingValue } from "./settings";
import { confirmRestart, creativeModeThreshold, restart } from "./game";
import { asyncAlert, requiredAsyncAlert } from "./asyncAlert";
import { requiredAsyncAlert } from "./asyncAlert";
import { describeLevel, highScoreForMode } from "./game_utils";
export function creativeMode(gameState: GameState) {

View file

@ -1 +1 @@
"29058469"
"29058637"

View file

@ -240,3 +240,11 @@ export function highScoreForMode(mode: GameState["mode"]) {
return "";
}
try {
const old = localStorage.getItem("breakout-3-hs");
if (old) {
localStorage.setItem("breakout-3-hs-short", old);
localStorage.removeItem("breakout-3-hs");
}
} catch (e) {}

View file

@ -64,7 +64,9 @@ export function newGameState(params: RunParams): GameState {
lastExplosion: -1000,
lastBrickBroken: 0,
highScore: parseFloat(
localStorage.getItem("breakout-3-hs-" + params?.mode || "short") || "0",
localStorage.getItem(
"breakout-3-hsbreakout-3-hs-" + params?.mode || "short",
) || "0",
),
balls: [],
ballsColor: "white",