mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 04:56:15 -04:00
Build 29041811
This commit is contained in:
parent
0c7d729ece
commit
edfc8b4f08
9 changed files with 19 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
// The version of the cache.
|
||||
const VERSION = "29041790";
|
||||
const VERSION = "29041811";
|
||||
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29041790"
|
||||
"29041811"
|
||||
|
|
|
@ -394,7 +394,7 @@ async function openScorePanel() {
|
|||
max: max_levels(gameState),
|
||||
}),
|
||||
text: `
|
||||
${gameState.isCreativeModeRun ? "<p>${t('score_panel.test_run}</p>" : ""}
|
||||
${gameState.isCreativeModeRun ? `<p>${t("score_panel.test_run")}</p>` : ""}
|
||||
<p>${t("score_panel.upgrades_picked")}</p>
|
||||
<p>${pickedUpgradesHTMl(gameState)}</p>
|
||||
`,
|
||||
|
|
|
@ -497,8 +497,11 @@ export function addToScore(gameState: GameState, coin: Coin) {
|
|||
}
|
||||
|
||||
export async function setLevel(gameState: GameState, l: number) {
|
||||
// Here to alleviade double upgrades issues
|
||||
|
||||
// Here to alleviate double upgrades issues
|
||||
if (gameState.upgradesOfferedFor >= l) {
|
||||
return console.warn("Extra upgrade request ignored ");
|
||||
}
|
||||
gameState.upgradesOfferedFor = l;
|
||||
pause(false);
|
||||
stopRecording();
|
||||
if (l > 0) {
|
||||
|
|
|
@ -31,6 +31,7 @@ export function newGameState(params: RunParams): GameState {
|
|||
const gameState: GameState = {
|
||||
runLevels,
|
||||
currentLevel: 0,
|
||||
upgradesOfferedFor: -1,
|
||||
perks,
|
||||
puckWidth: 200,
|
||||
baseSpeed: 12,
|
||||
|
|
1
src/types.d.ts
vendored
1
src/types.d.ts
vendored
|
@ -183,6 +183,7 @@ export type GameState = {
|
|||
gridSize: number;
|
||||
// 0 based index of the current level in the run (level X / 7)
|
||||
currentLevel: number;
|
||||
upgradesOfferedFor: number;
|
||||
|
||||
// 10 levels selected randomly at start for the run
|
||||
runLevels: Level[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue