import { allLevels, allLevelsAndIcons, icons, upgrades } from "./loadGameData"; import { t } from "./i18n/i18n"; import { asyncAlert } from "./asyncAlert"; import { miniMarkDown } from "./pure_functions"; import { catchRateBest, catchRateGood, levelTimeBest, levelTimeGood, missesBest, missesGood, } from "./pure_functions"; export function helpMenuEntry() { return { icon: icons["icon:help"], text: t("help.title"), help: t("help.help"), async value() { await asyncAlert({ title: t("help.title"), allowClose: true, content: [ miniMarkDown(t("help.content")), miniMarkDown(t("help.upgrades")), ...upgrades.map( (u) => `
${icons["icon:" + u.id]}

${u.name}
${u.help(1)}

${miniMarkDown(u.fullHelp(1))} `, ), "

" + t("help.levels") + "

", ...allLevelsAndIcons .filter((l) => l.credit?.trim()) .map( (l) => `
${icons[l.name]}

${l.name}

${miniMarkDown(l.credit || "")}
`, ), ], }); }, }; }