From 39a8f18fa3b56bcaf22c6dd11ca971bad354a7a1 Mon Sep 17 00:00:00 2001 From: Sarahtonin Date: Sun, 30 Aug 2026 17:52:24 +0200 Subject: [PATCH] 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. --- Scripts/Garden/Garden.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Scripts/Garden/Garden.js b/Scripts/Garden/Garden.js index f6599eb..497f49a 100644 --- a/Scripts/Garden/Garden.js +++ b/Scripts/Garden/Garden.js @@ -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 );