mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 05:26:15 -04:00
wip
This commit is contained in:
parent
ac2100860f
commit
2f51f83514
6 changed files with 96 additions and 60 deletions
17
src/game.ts
17
src/game.ts
|
@ -839,18 +839,19 @@ async function openUnlocksList() {
|
|||
};
|
||||
});
|
||||
|
||||
const percentUnlock = Math.round(
|
||||
([...upgradeActions, ...levelActions].filter((a) => !a.disabled).length /
|
||||
(upgradeActions.length + levelActions.length)) *
|
||||
100,
|
||||
);
|
||||
const tryOn = await asyncAlert<RunParams>({
|
||||
title: t("unlocks.title", { percentUnlock }),
|
||||
title: t("unlocks.title_upgrades", {
|
||||
unlocked:upgradeActions.filter((a) => !a.disabled).length,
|
||||
out_of:upgradeActions.length
|
||||
}),
|
||||
content: [
|
||||
`<p>${t("unlocks.intro", { ts })}
|
||||
${percentUnlock < 100 ? t("unlocks.greyed_out_help") : ""}</p> `,
|
||||
${upgradeActions.find(u=>u.disabled)? t("unlocks.greyed_out_help") : ""}</p> `,
|
||||
...upgradeActions,
|
||||
t("unlocks.level"),
|
||||
t("unlocks.level",{
|
||||
unlocked:levelActions.filter((a) => !a.disabled).length,
|
||||
out_of:levelActions.length
|
||||
}),
|
||||
...levelActions,
|
||||
],
|
||||
allowClose: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue