Check if time-based achievements are unlocked before initializing them in main-boot
This commit is contained in:
parent
ac1e5a0fb5
commit
c0702fd92f
|
@ -216,19 +216,25 @@ export async function mainBoot() {
|
||||||
claimAchievement('collectAchievements30');
|
claimAchievement('collectAchievements30');
|
||||||
}
|
}
|
||||||
|
|
||||||
window.setInterval(() => {
|
if (!claimedAchievements.includes('justPlainLucky')) {
|
||||||
if (Math.floor(Math.random() * 20000) === 0) {
|
window.setInterval(() => {
|
||||||
claimAchievement('justPlainLucky');
|
if (Math.floor(Math.random() * 20000) === 0) {
|
||||||
}
|
claimAchievement('justPlainLucky');
|
||||||
}, 1000 * 10);
|
}
|
||||||
|
}, 1000 * 10);
|
||||||
|
}
|
||||||
|
|
||||||
window.setTimeout(() => {
|
if (!claimedAchievements.includes('client30min')) {
|
||||||
claimAchievement('client30min');
|
window.setTimeout(() => {
|
||||||
}, 1000 * 60 * 30);
|
claimAchievement('client30min');
|
||||||
|
}, 1000 * 60 * 30);
|
||||||
|
}
|
||||||
|
|
||||||
window.setTimeout(() => {
|
if (!claimedAchievements.includes('client60min')) {
|
||||||
claimAchievement('client60min');
|
window.setTimeout(() => {
|
||||||
}, 1000 * 60 * 60);
|
claimAchievement('client60min');
|
||||||
|
}, 1000 * 60 * 60);
|
||||||
|
}
|
||||||
|
|
||||||
// 邪魔
|
// 邪魔
|
||||||
//const lastUsed = miLocalStorage.getItem('lastUsed');
|
//const lastUsed = miLocalStorage.getItem('lastUsed');
|
||||||
|
|
Loading…
Reference in New Issue