1
0
Fork 0
mirror of https://github.com/thepaperpilot/Advent-Incremental.git synced 2025-03-28 11:48:01 +00:00

Properly set trees amount

This commit is contained in:
thepaperpilot 2022-12-01 19:06:21 -06:00
parent d76706aec1
commit 5f8d052c9f
2 changed files with 8 additions and 1 deletions

View file

@ -332,6 +332,13 @@ export function fixOldSave(
(player.layers.trees as LayerData<typeof trees>).saplings ?? 0 (player.layers.trees as LayerData<typeof trees>).saplings ?? 0
); );
} }
} else if (oldVersion === "0.1") {
if (player.layers?.trees) {
const t = player.layers.trees as LayerData<typeof trees>;
t.trees = Decimal.add(1, t.row1Buyables?.[2]?.amount ?? 0)
.times(10)
.sub(t.saplings ?? 0);
}
} }
} }
/* eslint-enable @typescript-eslint/no-unused-vars */ /* eslint-enable @typescript-eslint/no-unused-vars */

View file

@ -8,7 +8,7 @@
"discordName": "", "discordName": "",
"discordLink": "", "discordLink": "",
"versionNumber": "0.1", "versionNumber": "0.2",
"versionTitle": "Initial Commit", "versionTitle": "Initial Commit",
"allowGoBack": true, "allowGoBack": true,