Can only use box link if the map allows escape
This commit is contained in:
parent
4dbb6011b6
commit
be5b46b6c4
1 changed files with 12 additions and 9 deletions
|
@ -56,7 +56,7 @@ static u8 GetDirectionToHiddenItem(s16, s16);
|
||||||
static void PlayerFaceHiddenItem(u8);
|
static void PlayerFaceHiddenItem(u8);
|
||||||
static void CheckForHiddenItemsInMapConnection(u8);
|
static void CheckForHiddenItemsInMapConnection(u8);
|
||||||
static void Task_OpenRegisteredPokeblockCase(u8);
|
static void Task_OpenRegisteredPokeblockCase(u8);
|
||||||
static void Task_WaitFadeAccessPokemonBoxLink(u8);
|
static void Task_AccessPokemonBoxLink(u8);
|
||||||
static void ItemUseOnFieldCB_Bike(u8);
|
static void ItemUseOnFieldCB_Bike(u8);
|
||||||
static void ItemUseOnFieldCB_Rod(u8);
|
static void ItemUseOnFieldCB_Rod(u8);
|
||||||
static void ItemUseOnFieldCB_Itemfinder(u8);
|
static void ItemUseOnFieldCB_Itemfinder(u8);
|
||||||
|
@ -681,17 +681,20 @@ static void Task_OpenRegisteredPokeblockCase(u8 taskId)
|
||||||
|
|
||||||
void ItemUseOutOfBattle_PokemonBoxLink(u8 taskId)
|
void ItemUseOutOfBattle_PokemonBoxLink(u8 taskId)
|
||||||
{
|
{
|
||||||
sItemUseOnFieldCB = Task_WaitFadeAccessPokemonBoxLink;
|
if (CanUseDigOrEscapeRopeOnCurMap)
|
||||||
SetUpItemUseOnFieldCallback(taskId);
|
{
|
||||||
|
sItemUseOnFieldCB = Task_AccessPokemonBoxLink;
|
||||||
|
SetUpItemUseOnFieldCallback(taskId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].tUsingRegisteredKeyItem);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Task_WaitFadeAccessPokemonBoxLink(u8 taskId)
|
static void Task_AccessPokemonBoxLink(u8 taskId)
|
||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
ScriptContext_SetupScript(EventScript_AccessPokemonBoxLink);
|
||||||
{
|
DestroyTask(taskId);
|
||||||
ScriptContext_SetupScript(EventScript_AccessPokemonBoxLink);
|
|
||||||
DestroyTask(taskId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemUseOutOfBattle_CoinCase(u8 taskId)
|
void ItemUseOutOfBattle_CoinCase(u8 taskId)
|
||||||
|
|
Loading…
Reference in a new issue