This commit is contained in:
Renan LE CARO 2025-04-07 14:08:48 +02:00
parent 9624c5b351
commit e78021ff83
24 changed files with 840 additions and 437 deletions

View file

@ -125,16 +125,17 @@ export function getHistograms(gameState: GameState) {
.map((l, li) => ({
li,
l,
r: reasonLevelIsLocked(li, runsHistory),
r: reasonLevelIsLocked(li, runsHistory, false)?.text,
}))
.filter((l) => l.r);
gameState.runStatistics.runTime=Math.round(gameState.runStatistics.runTime)
const perks={...gameState.perks}
for(let id in perks){
if(!perks[id]){
delete perks[id]
gameState.runStatistics.runTime = Math.round(
gameState.runStatistics.runTime,
);
const perks = { ...gameState.perks };
for (let id in perks) {
if (!perks[id]) {
delete perks[id];
}
}
runsHistory.push({
@ -144,7 +145,7 @@ export function getHistograms(gameState: GameState) {
});
const unlocked = locked.filter(
({ li }) => !reasonLevelIsLocked(li, runsHistory),
({ li }) => !reasonLevelIsLocked(li, runsHistory, true),
);
if (unlocked.length) {
unlockedLevels = `