Build 29091656

This commit is contained in:
Renan LE CARO 2025-04-24 14:57:08 +02:00
parent f48d9bdfa3
commit e2d8a0ab5c
28 changed files with 2607 additions and 2496 deletions

View file

@ -113,7 +113,6 @@ export async function play() {
}
export function pause(playerAskedForPause: boolean) {
if (!gameState.running) return;
if (gameState.pauseTimeout) return;
if (gameState.startParams.computer_controlled) {
@ -251,8 +250,7 @@ setInterval(() => {
export async function openUpgradesPicker(gameState: GameState) {
const catchRate =
(gameState.score - gameState.levelStartScore) /
(gameState.levelSpawnedCoins || 1);
gameState.levelCoughtCoins / (gameState.levelSpawnedCoins || 1);
let repeats = 1;
@ -329,7 +327,7 @@ export async function openUpgradesPicker(gameState: GameState) {
(repeats ? " (" + (repeats + 1) + ")" : ""),
content: [
`<p>${t("level_up.before_buttons", {
score: gameState.score - gameState.levelStartScore,
score: gameState.levelCoughtCoins,
catchGain,
levelSpawnedCoins: gameState.levelSpawnedCoins,
time: Math.round(gameState.levelTime / 1000),
@ -459,8 +457,7 @@ export function tick() {
) * frames;
const steps = Math.ceil(maxBallSpeed / 8);
for (let i = 0; i < steps; i++) {
gameStateTick(gameState, frames / steps);
gameStateTick(gameState, frames / steps);
}
}
@ -539,7 +536,6 @@ setInterval(() => {
monitorLevelsUnlocks(gameState);
}, 500);
scoreDisplay.addEventListener("click", (e) => {
e.preventDefault();
if (!alertsOpen) {
@ -925,8 +921,8 @@ async function openUnlockedUpgradesList() {
ts < threshold
? t("unlocks.minTotalScore", { score: threshold })
: help(1),
tooltip: ts < threshold ? "" : fullHelp(1)+ ' [id:'+id+ ']',
threshold
tooltip: ts < threshold ? "" : fullHelp(1) + " [id:" + id + "]",
threshold,
}))
.sort((a, b) => a.threshold - b.threshold);