From ff44021beda72ac7b1b455c4562f31606e54b3fc Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Thu, 4 Apr 2024 17:50:07 -0700 Subject: [PATCH 1/2] Added OW_PC_MOVE_ORDER config --- include/config/overworld.h | 1 + src/pokemon_storage_system.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/config/overworld.h b/include/config/overworld.h index fcbcf707d845..5fa3739cbf71 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -13,6 +13,7 @@ #define OW_PC_PRESS_B GEN_LATEST // In Gen4, pressing B when holding a Pokémon is equivalent to placing it. In Gen3, it gives the "You're holding a Pokémon!" error. #define OW_PC_JAPAN_WALDA_ICONS TRUE // In the US release of Emerald, the Cross, Bolt, and Plusle icons for Walda's wallpapers were left blank from the Japan release. Setting this to TRUE will restore them. #define OW_PC_HEAL GEN_LATEST // In Gen8+, Pokémon are not healed when deposited in the PC. +#define OW_PC_MOVE_ORDER GEN_LATEST // In Gen4+, Move Pokémon becomes the first option in the PC Menu. // Berry settings // These generational defines only make a distinction for Berries! diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 8f981ed8545b..b76708faed24 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -52,9 +52,14 @@ // PC main menu options enum { +#if OW_PC_MOVE_ORDER >= GEN_4 + OPTION_MOVE_MONS, +#endif OPTION_WITHDRAW, OPTION_DEPOSIT, +#if OW_PC_MOVE_ORDER < GEN_4 OPTION_MOVE_MONS, +#endif OPTION_MOVE_ITEMS, OPTION_EXIT, OPTIONS_COUNT From dd798098b56d5aebde091540cd5ee8641f9d7c62 Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Thu, 4 Apr 2024 20:56:53 -0700 Subject: [PATCH 2/2] Implemented feedback from https://github.com/rh-hideout/pokeemerald-expansion/pull/4348\#pullrequestreview-1981473856 --- include/config/overworld.h | 11 +++++------ src/pokemon_storage_system.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/config/overworld.h b/include/config/overworld.h index 5fa3739cbf71..ca7a25311c43 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -9,16 +9,15 @@ #define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times. #define OW_DOUBLE_APPROACH_WITH_ONE_MON FALSE // If enabled, you can be spotted by two trainers at the same time even if you only have one eligible Pokémon in your party. +// These generational defines only make a distinction for Berries and the OW_PC_MOVE_ORDER +#define GEN_6_XY GEN_6 +#define GEN_6_ORAS GEN_LATEST + 1 + // PC settings #define OW_PC_PRESS_B GEN_LATEST // In Gen4, pressing B when holding a Pokémon is equivalent to placing it. In Gen3, it gives the "You're holding a Pokémon!" error. #define OW_PC_JAPAN_WALDA_ICONS TRUE // In the US release of Emerald, the Cross, Bolt, and Plusle icons for Walda's wallpapers were left blank from the Japan release. Setting this to TRUE will restore them. #define OW_PC_HEAL GEN_LATEST // In Gen8+, Pokémon are not healed when deposited in the PC. -#define OW_PC_MOVE_ORDER GEN_LATEST // In Gen4+, Move Pokémon becomes the first option in the PC Menu. - -// Berry settings -// These generational defines only make a distinction for Berries! -#define GEN_6_XY GEN_6 -#define GEN_6_ORAS GEN_LATEST + 1 +#define OW_PC_MOVE_ORDER GEN_LATEST // Starting in Gen4, the order of options in the PC menu change. #define OW_BERRY_MUTATIONS FALSE // If enabled, Berry plants can mutate based on berries planted next to them. #define OW_BERRY_MUTATION_CHANCE 25 // Determines the % chance of a mutation. diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index b76708faed24..013f7e21b425 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -52,13 +52,18 @@ // PC main menu options enum { -#if OW_PC_MOVE_ORDER >= GEN_4 - OPTION_MOVE_MONS, -#endif +#if OW_PC_MOVE_ORDER <= GEN_3 OPTION_WITHDRAW, OPTION_DEPOSIT, -#if OW_PC_MOVE_ORDER < GEN_4 OPTION_MOVE_MONS, +#elif OW_PC_MOVE_ORDER >= GEN_4 && OW_PC_MOVE_ORDER <= GEN_6_XY + OPTION_DEPOSIT, + OPTION_WITHDRAW, + OPTION_MOVE_MONS, +#elif OW_PC_MOVE_ORDER >= GEN_7 + OPTION_MOVE_MONS, + OPTION_DEPOSIT, + OPTION_WITHDRAW, #endif OPTION_MOVE_ITEMS, OPTION_EXIT,