This commit is contained in:
Renan LE CARO 2025-04-26 20:07:01 +02:00
parent bcf40fe667
commit 096f7d4abd
13 changed files with 1917 additions and 225 deletions

View file

@ -5,7 +5,6 @@ import {
getHighScore,
getPossibleUpgrades,
highScoreText,
reasonLevelIsLocked,
makeEmptyPerksMap,
sumOfValues,
} from "./game_utils";
@ -14,6 +13,7 @@ import { isOptionOn } from "./options";
import { getHistory } from "./gameOver";
import { getSettingValue, getTotalScore } from "./settings";
import { isBlackListedForStart, isStartingPerk } from "./startingPerks";
import {isLevelLocked, reasonLevelIsLocked} from "./get_level_unlock_condition";
export function getRunLevels(
params: RunParams,
@ -26,7 +26,7 @@ export function getRunLevels(
const history = getHistory();
const unlocked = allLevels.filter(
(l, li) =>
unlockedBefore.has(l.name) || !reasonLevelIsLocked(li, history, false),
unlockedBefore.has(l.name) || !isLevelLocked(li, l.name, history),
);
const firstLevel = params?.level
? [params.level]