From b49abf9904a2d323759360165406d420549a2c06 Mon Sep 17 00:00:00 2001 From: Renan LE CARO Date: Tue, 1 Apr 2025 16:37:34 +0200 Subject: [PATCH] Build 29058637 --- Readme.md | 21 ++++++++++++------- app/build.gradle.kts | 4 ++-- app/src/main/assets/index.html | 2 +- .../java/me/lecaro/breakout/MainActivity.kt | 4 +--- dist/index.html | 11 ++++++++-- src/PWA/sw-b71.js | 2 +- src/creative.ts | 2 +- src/data/version.json | 2 +- src/game_utils.ts | 8 +++++++ src/newGameState.ts | 4 +++- 10 files changed, 40 insertions(+), 20 deletions(-) diff --git a/Readme.md b/Readme.md index 55fae55..bbd7a8b 100644 --- a/Readme.md +++ b/Readme.md @@ -23,7 +23,12 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades ! - Top down /reach: punishing now, maybe only reset if you hit the lowest populate row of the level, if it's not a full width row - main menu : show high score -## Release candidate +## next release + +- keep high score of past runs + +## 29058469 + - New game mode : loop / long game - the goal is to build many different build centered on one perk @@ -34,7 +39,7 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades ! - unlocked after unlocking all perks - New game mode : lab / creative - the goal is to come up with 3 completely different but powerful play styles - - you freely create 3 builds from all the perks level avaliable + - you freely create 3 builds from all the perks level available - you play them against the levels of your choice - try to make as much score as possible in total - unlocked after unlocking all perks @@ -43,7 +48,7 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades ! - Sunglasses - Balloon - Adjusted levels : - - orca is no longer made of bombs, but grey block + - orca is no longer made of bombs, but gray block - New perks - addiction : reward faster gameplay - Adjusted perks @@ -68,16 +73,16 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades ! - trampoline: nerfed a little bit, now all sides and top hit reduce combo - Quality of life - - Udated discord invite link that had expired - - Fullscreen is now a persistent option, when it's on the game will switch to fullscreen before starting + - Updated discord invite link that had expired + - Full screen is now a persistent option, when it's on the game will switch to full screen before starting - Added an option to always get colored coins - Made the "combo lost" text last 500ms instead of the pointless 150ms - - Added in-game help and credits, witch can be translated + - Added in-game help and credits, which can be translated - Balancing : you earn an extra perk when playing well, and a reroll when playing perfectly - added a prominent "donate" link after 5h of playing, and setting to hide it permanently - - disabled auto-release to fdroid, i'll use the web version as the testing ground first + - disabled auto-release to F-Droid, i'll use the web version as the testing ground first - added a white border around all coins, to make dark ones visible on dark bg - - [jaceys] Counters for coins lost, misses, and boundary bounces, as well as a timer. + - [jaceys] counters for coins lost, misses, and boundary bounces, as well as a timer. - Unlocked list : split perk and levels, added tooltips ## 29049575 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 669a738..35bb074 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,8 +11,8 @@ android { applicationId = "me.lecaro.breakout" minSdk = 21 targetSdk = 34 - versionCode = 29058469 - versionName = "29058469" + versionCode = 29058637 + versionName = "29058637" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html index ce77e23..344a248 100644 --- a/app/src/main/assets/index.html +++ b/app/src/main/assets/index.html @@ -1 +1 @@ -Breakout 71 \ No newline at end of file +Breakout 71 \ No newline at end of file diff --git a/app/src/main/java/me/lecaro/breakout/MainActivity.kt b/app/src/main/java/me/lecaro/breakout/MainActivity.kt index ef0ab65..5172fd3 100644 --- a/app/src/main/java/me/lecaro/breakout/MainActivity.kt +++ b/app/src/main/java/me/lecaro/breakout/MainActivity.kt @@ -126,10 +126,8 @@ class MainActivity : android.app.Activity() { webView.settings.domStorageEnabled = true webView.settings.setSupportZoom(false) - val installerPackageName = packageManager.getInstallerPackageName(packageName) - - webView.loadUrl("file:///android_asset/index.html?isInWebView=true&source=$installerPackageName") + webView.loadUrl("file:///android_asset/index.html?isInWebView=true") val activity = this; webView.webChromeClient = object : WebChromeClient() { diff --git a/dist/index.html b/dist/index.html index a734a7f..68d3763 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1461,7 +1461,7 @@ const upgrades = (0, _upgrades.rawUpgrades).map((u)=>({ })); },{"./data/palette.json":"ktRBU","./data/levels.json":"8JSUc","./data/version.json":"iyP6E","./upgrades":"1u3Dx","./getLevelBackground":"7OIPf","./levelIcon":"6rQoT","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"iyP6E":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse("\"29058469\""); +module.exports = JSON.parse("\"29058637\""); },{}],"1u3Dx":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); @@ -2758,6 +2758,13 @@ function highScoreForMode(mode) { } catch (e) {} 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) {} },{"./loadGameData":"l1B4x","./i18n/i18n":"eNPRm","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"2n0gK":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); @@ -4687,7 +4694,7 @@ function newGameState(params) { lastScoreIncrease: -1000, lastExplosion: -1000, lastBrickBroken: 0, - highScore: parseFloat(localStorage.getItem("breakout-3-hs-" + params?.mode) || "0"), + highScore: parseFloat(localStorage.getItem("breakout-3-hsbreakout-3-hs-" + params?.mode) || "0"), balls: [], ballsColor: "white", bricks: [], diff --git a/src/PWA/sw-b71.js b/src/PWA/sw-b71.js index c683522..62ba78c 100644 --- a/src/PWA/sw-b71.js +++ b/src/PWA/sw-b71.js @@ -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}`; diff --git a/src/creative.ts b/src/creative.ts index 1733c9a..8784183 100644 --- a/src/creative.ts +++ b/src/creative.ts @@ -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) { diff --git a/src/data/version.json b/src/data/version.json index 80cd7f6..1b9acb4 100644 --- a/src/data/version.json +++ b/src/data/version.json @@ -1 +1 @@ -"29058469" +"29058637" diff --git a/src/game_utils.ts b/src/game_utils.ts index 9700ceb..a7b1572 100644 --- a/src/game_utils.ts +++ b/src/game_utils.ts @@ -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) {} diff --git a/src/newGameState.ts b/src/newGameState.ts index f0ad9bf..77cbd76 100644 --- a/src/newGameState.ts +++ b/src/newGameState.ts @@ -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",