Skip to content

Commit

Permalink
Fix 6 stage Berry trees not growing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Bassoonian committed Dec 24, 2023
1 parent 9be8fed commit c115649
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/config/overworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion src/berry.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down

0 comments on commit c115649

Please sign in to comment.