Skip to content

Commit c48cc7e

Browse files
authored
Merge pull request #569 from kichithewolf/LGPE-etc
handle extra dialog in gift reset
2 parents 55d1c47 + 872aa4b commit c48cc7e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

SerialPrograms/Source/PokemonLGPE/Programs/ShinyHunting/PokemonLGPE_GiftReset.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ std::unique_ptr<StatsTracker> GiftReset_Descriptor::make_stats() const{
5252
}
5353

5454
GiftReset::GiftReset()
55-
: GO_HOME_WHEN_DONE(false)
55+
: EXTRA_DIALOG(
56+
"<b>Persian/Arcanine:</b><br>Check this if the gift Pokemon is Persian or Arcanine.",
57+
LockMode::UNLOCK_WHILE_RUNNING, false
58+
)
59+
, GO_HOME_WHEN_DONE(false)
5660
, NOTIFICATION_SHINY(
5761
"Shiny Found",
5862
true, true, ImageAttachmentMode::JPG,
@@ -65,6 +69,7 @@ GiftReset::GiftReset()
6569
&NOTIFICATION_PROGRAM_FINISH,
6670
})
6771
{
72+
PA_ADD_OPTION(EXTRA_DIALOG);
6873
PA_ADD_OPTION(GO_HOME_WHEN_DONE);
6974
PA_ADD_OPTION(NOTIFICATIONS);
7075
}
@@ -114,6 +119,12 @@ void GiftReset::program(SingleSwitchProgramEnvironment& env, CancellableScope& s
114119
"Received gift Pokemon."
115120
);
116121

122+
if (EXTRA_DIALOG){
123+
env.log("Persian/Arcanine selected. Mashing B to exit dialog.");
124+
pbf_mash_button(context, BUTTON_B, 4100ms);
125+
context.wait_for_all_requests();
126+
}
127+
117128
//Wait a bit.
118129
pbf_wait(context, 2500ms);
119130
context.wait_for_all_requests();

SerialPrograms/Source/PokemonLGPE/Programs/ShinyHunting/PokemonLGPE_GiftReset.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class GiftReset : public SingleSwitchProgramInstance{
3030
virtual void program(SingleSwitchProgramEnvironment& env, CancellableScope& scope) override;
3131

3232
private:
33+
BooleanCheckBoxOption EXTRA_DIALOG;
3334
GoHomeWhenDoneOption GO_HOME_WHEN_DONE;
3435

3536
EventNotificationOption NOTIFICATION_SHINY;

0 commit comments

Comments
 (0)