mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-19 12:01:37 +00:00
Properly set trees amount
This commit is contained in:
parent
d76706aec1
commit
5f8d052c9f
2 changed files with 8 additions and 1 deletions
|
@ -332,6 +332,13 @@ export function fixOldSave(
|
|||
(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 */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"discordName": "",
|
||||
"discordLink": "",
|
||||
|
||||
"versionNumber": "0.1",
|
||||
"versionNumber": "0.2",
|
||||
"versionTitle": "Initial Commit",
|
||||
|
||||
"allowGoBack": true,
|
||||
|
|
Loading…
Add table
Reference in a new issue