This commit is contained in:
Renan LE CARO 2025-03-20 23:11:42 +01:00
parent 0c7d729ece
commit edfc8b4f08
9 changed files with 19 additions and 11 deletions

View file

@ -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) {