Add config for pressing B in the PC

This commit is contained in:
Bassoonian 2023-09-21 16:26:00 +02:00
parent 5b498e968f
commit b673738ba5
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,9 @@
// Other settings // Other settings
#define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all. #define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all.
// 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.
// Overworld flags // Overworld flags
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. // Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.

View File

@ -3685,9 +3685,14 @@ static void Task_OnBPressed(u8 taskId)
case 0: case 0:
if (IsMonBeingMoved()) if (IsMonBeingMoved())
{ {
#if OW_PC_PRESS_B < GEN_4
PlaySE(SE_FAILURE); PlaySE(SE_FAILURE);
PrintMessage(MSG_HOLDING_POKE); PrintMessage(MSG_HOLDING_POKE);
sStorage->state = 1; sStorage->state = 1;
#else
PlaySE(SE_SELECT);
SetPokeStorageTask(Task_PlaceMon);
#endif
} }
else if (IsMovingItem()) else if (IsMovingItem())
{ {