Fixed GetPlantInage so that it changes to the last image when it's at

100%.. I got a bit confused when I couldn't harvest the final image.
This commit is contained in:
sarah committed 2026-08-30 17:52:24 +02:00
1 parent bf15c48c10
commit 39a8f18fa3
1 file changed
+14 -2
+14 -2
View File
@@ -596,6 +596,10 @@ function GetPlantImage(
return null;
}
if (Images.length === 1) {
return Images[0];
}
const Progress =
GetPlantGrowthProgress(
@@ -603,15 +607,23 @@ function GetPlantImage(
Plant
);
if (Progress >= 1) {
return Images[
Images.length - 1
];
}
const GrowingImageCount =
Images.length - 1;
const ImageIndex =
Math.min(
Math.floor(
Progress *
Images.length
GrowingImageCount
),
Images.length - 1
GrowingImageCount - 1
);