mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 14:36:15 -04:00
Build 29085904
This commit is contained in:
parent
de485e5598
commit
f1cd138071
8 changed files with 22 additions and 9 deletions
|
@ -27,6 +27,7 @@ Other translation are very welcome, contact me if you'd like to submit one.
|
||||||
## Done
|
## Done
|
||||||
|
|
||||||
- toast an error if storage is blocked
|
- toast an error if storage is blocked
|
||||||
|
- toast an error if migration fails
|
||||||
- in apk, video download doesn't work
|
- in apk, video download doesn't work
|
||||||
- ask for permanent storage
|
- 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
|
- 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
|
||||||
|
|
|
@ -29,8 +29,8 @@ android {
|
||||||
applicationId = "me.lecaro.breakout"
|
applicationId = "me.lecaro.breakout"
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 29085898
|
versionCode = 29085904
|
||||||
versionName = "29085898"
|
versionName = "29085904"
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables {
|
vectorDrawables {
|
||||||
useSupportLibrary = true
|
useSupportLibrary = true
|
||||||
|
|
File diff suppressed because one or more lines are too long
12
dist/index.html
vendored
12
dist/index.html
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
// The version of the cache.
|
// The version of the cache.
|
||||||
const VERSION = "29085898";
|
const VERSION = "29085904";
|
||||||
|
|
||||||
// The name of the cache
|
// The name of the cache
|
||||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
"29085898"
|
"29085904"
|
||||||
|
|
|
@ -4,6 +4,7 @@ import _appVersion from "./data/version.json";
|
||||||
import { generateSaveFileContent } from "./generateSaveFileContent";
|
import { generateSaveFileContent } from "./generateSaveFileContent";
|
||||||
import { getLevelUnlockCondition, reasonLevelIsLocked } from "./game_utils";
|
import { getLevelUnlockCondition, reasonLevelIsLocked } from "./game_utils";
|
||||||
import { allLevels } from "./loadGameData";
|
import { allLevels } from "./loadGameData";
|
||||||
|
import { toast } from "./toast";
|
||||||
|
|
||||||
// The page will be reloaded if any migrations were run
|
// The page will be reloaded if any migrations were run
|
||||||
let migrationsRun = 0;
|
let migrationsRun = 0;
|
||||||
|
@ -15,6 +16,7 @@ function migrate(name: string, cb: () => void) {
|
||||||
localStorage.setItem(name, "" + Date.now());
|
localStorage.setItem(name, "" + Date.now());
|
||||||
migrationsRun++;
|
migrationsRun++;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
toast((e as Error).message);
|
||||||
console.warn("Migration " + name + " failed : ", e);
|
console.warn("Migration " + name + " failed : ", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,17 @@
|
||||||
import { toast } from "./toast";
|
import { toast } from "./toast";
|
||||||
|
|
||||||
let cachedSettings: { [key: string]: unknown } = {};
|
let cachedSettings: { [key: string]: unknown } = {};
|
||||||
|
let warnedUserAboutLSIssue = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (let key in localStorage) {
|
for (let key in localStorage) {
|
||||||
try {
|
try {
|
||||||
cachedSettings[key] = JSON.parse(localStorage.getItem(key) || "null");
|
cachedSettings[key] = JSON.parse(localStorage.getItem(key) || "null");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (!warnedUserAboutLSIssue) {
|
||||||
|
warnedUserAboutLSIssue = true;
|
||||||
|
toast(`Storage issue : ${(e as Error)?.message}`);
|
||||||
|
}
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +33,6 @@ export function setSettingValue<T>(key: string, value: T) {
|
||||||
cachedSettings[key] = value;
|
cachedSettings[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
let warnedUserAboutLSIssue = false;
|
|
||||||
export function commitSettingsChangesToLocalStorage() {
|
export function commitSettingsChangesToLocalStorage() {
|
||||||
try {
|
try {
|
||||||
for (let key of needsSaving) {
|
for (let key of needsSaving) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue