Build 29085904

This commit is contained in:
Renan LE CARO 2025-04-20 15:04:53 +02:00
parent de485e5598
commit f1cd138071
8 changed files with 22 additions and 9 deletions

View file

@ -27,6 +27,7 @@ Other translation are very welcome, contact me if you'd like to submit one.
## Done
- toast an error if storage is blocked
- toast an error if migration fails
- in apk, video download doesn't work
- ask for permanent storage
- option: reuse past frame's light in new frame lighting computation when there are 150+ coins on screen, to limit the performance impact of rendering lots of lights

View file

@ -29,8 +29,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
versionCode = 29085898
versionName = "29085898"
versionCode = 29085904
versionName = "29085904"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true

File diff suppressed because one or more lines are too long

12
dist/index.html vendored

File diff suppressed because one or more lines are too long

View file

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

View file

@ -1 +1 @@
"29085898"
"29085904"

View file

@ -4,6 +4,7 @@ import _appVersion from "./data/version.json";
import { generateSaveFileContent } from "./generateSaveFileContent";
import { getLevelUnlockCondition, reasonLevelIsLocked } from "./game_utils";
import { allLevels } from "./loadGameData";
import { toast } from "./toast";
// The page will be reloaded if any migrations were run
let migrationsRun = 0;
@ -15,6 +16,7 @@ function migrate(name: string, cb: () => void) {
localStorage.setItem(name, "" + Date.now());
migrationsRun++;
} catch (e) {
toast((e as Error).message);
console.warn("Migration " + name + " failed : ", e);
}
}

View file

@ -3,12 +3,17 @@
import { toast } from "./toast";
let cachedSettings: { [key: string]: unknown } = {};
let warnedUserAboutLSIssue = false;
try {
for (let key in localStorage) {
try {
cachedSettings[key] = JSON.parse(localStorage.getItem(key) || "null");
} catch (e) {
if (!warnedUserAboutLSIssue) {
warnedUserAboutLSIssue = true;
toast(`Storage issue : ${(e as Error)?.message}`);
}
console.warn(e);
}
}
@ -28,7 +33,6 @@ export function setSettingValue<T>(key: string, value: T) {
cachedSettings[key] = value;
}
let warnedUserAboutLSIssue = false;
export function commitSettingsChangesToLocalStorage() {
try {
for (let key of needsSaving) {