mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 22:16:14 -04:00
Build 29084606
This commit is contained in:
parent
603ebf319a
commit
6adab3d07f
9 changed files with 87 additions and 82 deletions
|
@ -80,16 +80,28 @@ migrate("remove_long_and_creative_mode_data", () => {
|
|||
localStorage.setItem("breakout_71_runs_history", JSON.stringify(cleaned));
|
||||
});
|
||||
|
||||
migrate("compact_runs_data", () => {
|
||||
migrate("compact_runs_data_again", () => {
|
||||
let runsHistory = JSON.parse(
|
||||
localStorage.getItem("breakout_71_runs_history") || "[]",
|
||||
) as RunHistoryItem[];
|
||||
runsHistory = runsHistory.filter((r) => {
|
||||
if (!r.perks) return false;
|
||||
if ("mode" in r) {
|
||||
if (r.mode !== "short") {
|
||||
return false;
|
||||
}
|
||||
delete r.mode;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
runsHistory.forEach((r) => {
|
||||
r.runTime = Math.round(r.runTime);
|
||||
for (let key in r.perks) {
|
||||
if (r.perks && !r.perks[key]) {
|
||||
delete r.perks[key];
|
||||
if (r.perks) {
|
||||
for (let key in r.perks) {
|
||||
if (!r.perks[key]) {
|
||||
delete r.perks[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("best_level_score" in r) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue