Skip to content
Snippets Groups Projects
Verified Commit c0702fd9 authored by Evangelos Paterakis's avatar Evangelos Paterakis
Browse files

Check if time-based achievements are unlocked before initializing them in main-boot

parent ac1e5a0f
No related branches found
No related tags found
No related merge requests found
......@@ -216,19 +216,25 @@ export async function mainBoot() {
claimAchievement('collectAchievements30');
}
window.setInterval(() => {
if (Math.floor(Math.random() * 20000) === 0) {
claimAchievement('justPlainLucky');
}
}, 1000 * 10);
if (!claimedAchievements.includes('justPlainLucky')) {
window.setInterval(() => {
if (Math.floor(Math.random() * 20000) === 0) {
claimAchievement('justPlainLucky');
}
}, 1000 * 10);
}
window.setTimeout(() => {
claimAchievement('client30min');
}, 1000 * 60 * 30);
if (!claimedAchievements.includes('client30min')) {
window.setTimeout(() => {
claimAchievement('client30min');
}, 1000 * 60 * 30);
}
window.setTimeout(() => {
claimAchievement('client60min');
}, 1000 * 60 * 60);
if (!claimedAchievements.includes('client60min')) {
window.setTimeout(() => {
claimAchievement('client60min');
}, 1000 * 60 * 60);
}
// 邪魔
//const lastUsed = miLocalStorage.getItem('lastUsed');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment