mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-15 16:33:02 -03:00
feat: add support to new json achievement file structure
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -208,6 +208,19 @@ const processSkidrow = (unlockedAchievements: any): UnlockedAchievement[] => {
|
||||
const processGoldberg = (unlockedAchievements: any): UnlockedAchievement[] => {
|
||||
const newUnlockedAchievements: UnlockedAchievement[] = [];
|
||||
|
||||
if (Array.isArray(unlockedAchievements)) {
|
||||
for (const achievement of unlockedAchievements) {
|
||||
if (achievement?.earned) {
|
||||
newUnlockedAchievements.push({
|
||||
name: achievement.name,
|
||||
unlockTime: achievement.earned_time * 1000,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return newUnlockedAchievements;
|
||||
}
|
||||
|
||||
for (const achievement of Object.keys(unlockedAchievements)) {
|
||||
const unlockedAchievement = unlockedAchievements[achievement];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user