mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2025-03-14 11:43:52 +01:00
Migrate old 1.4 achievement
This commit is contained in:
parent
ed7c514bcc
commit
ffe2be14bb
1 changed files with 21 additions and 0 deletions
|
@ -134,6 +134,27 @@
|
|||
const achievementData = readSave(`${prefix}achievement`);
|
||||
if (achievementData !== null) {
|
||||
checkList = JSON.parse(achievementData);
|
||||
migrateNewVersion();
|
||||
}
|
||||
}
|
||||
|
||||
function migrateNewVersion() {
|
||||
// version 1.5
|
||||
// prettier-ignore
|
||||
const movedIds = [
|
||||
84026, 84100, 84101, 84104, 84028,
|
||||
84107, 84102, 84108, 84105, 84103,
|
||||
84106, 84109, 84110, 84111, 84112,
|
||||
84113, 84114, 84115
|
||||
];
|
||||
|
||||
if (checkList['0']) {
|
||||
for (const item of movedIds) {
|
||||
if (checkList['0'][item] === true) {
|
||||
checkList['17'][item] = true;
|
||||
delete checkList['0'][item];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue