From c115649349f9b8447e492a4beb46a15c20ae216a Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sun, 24 Dec 2023 23:08:15 +0100 Subject: [PATCH] Fix 6 stage Berry trees not growing properly --- include/config/overworld.h | 2 +- src/berry.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/config/overworld.h b/include/config/overworld.h index 238e254c68..41ea797546 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -23,7 +23,7 @@ #define OW_BERRY_MULCH_USAGE FALSE // If enabled, Mulch can be used on soil to fertilize it. Otherwise, it is considered unusable. Note that moisture effects only work with OW_BERRY_MOISTURE enabled! #define OW_BERRY_WEEDS FALSE // If enabled, weeds may grow on Berry plants that the player needs to take care of. Without OW_BERRY_MOISTURE, weeding bonuses are rounded down. #define OW_BERRY_PESTS FALSE // If enabled, pests may approach Berry plants that the player needs to take care of. Without OW_BERRY_MOISTURE, pest bonuses are rounded down. -#define OW_BERRY_SIX_STAGES FALSE // In XY, Berries go through six stages instead of four. This toggle does not affect the time it takes for a tree to be ready for harvest. Without OW_BERRY_MOISTURE, the two extra stages count as BERRY_STAGE_TALLER for watering purposes. +#define OW_BERRY_SIX_STAGES TRUE // In XY, Berries go through six stages instead of four. This toggle does not affect the time it takes for a tree to be ready for harvest. Without OW_BERRY_MOISTURE, the two extra stages count as BERRY_STAGE_TALLER for watering purposes. #define OW_BERRY_GROWTH_RATE GEN_3 // Presets for how long each Berry plant takes to grow. #define OW_BERRY_YIELD_RATE GEN_3 // Presets for how many Berries each plant can yield. diff --git a/src/berry.c b/src/berry.c index f1f567e180..60776af2c6 100644 --- a/src/berry.c +++ b/src/berry.c @@ -1935,7 +1935,6 @@ bool32 BerryTreeGrow(struct BerryTree *tree) case BERRY_STAGE_PLANTED: case BERRY_STAGE_SPROUTED: case BERRY_STAGE_TRUNK: - case BERRY_STAGE_BUDDING: tree->stage++; break; case BERRY_STAGE_TALLER: @@ -1944,6 +1943,10 @@ bool32 BerryTreeGrow(struct BerryTree *tree) else tree->stage++; break; + case BERRY_STAGE_BUDDING: + tree->berryYield = CalcBerryYield(tree); + tree->stage = BERRY_STAGE_BERRIES; + break; case BERRY_STAGE_BERRIES: tree->watered = 0; tree->berryYield = 0;