Skip to content

Commit 55e396e

Browse files
author
Gin
committed
minor
1 parent ca81b12 commit 55e396e

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

SerialPrograms/Source/PokemonLZA/Programs/ShinyHunting/PokemonLZA_AutoFossil.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,7 @@ AutoFossil::AutoFossil()
9898
LockMode::UNLOCK_WHILE_RUNNING,
9999
true
100100
)
101-
, GO_HOME_WHEN_DONE(
102-
"Go home when done",
103-
LockMode::UNLOCK_WHILE_RUNNING,
104-
true
105-
)
101+
, GO_HOME_WHEN_DONE(true)
106102
, NOTIFICATION_STATUS("Status Update", true, false, std::chrono::seconds(3600))
107103
, NOTIFICATIONS({
108104
&NOTIFICATION_STATUS,
@@ -293,9 +289,7 @@ bool AutoFossil::check_fossils_in_one_box(
293289
pbf_press_button(context, BUTTON_CAPTURE, 2 * TICKS_PER_SECOND, 0);
294290
context.wait_for_all_requests();
295291
}
296-
if (GO_HOME_WHEN_DONE){
297-
go_home(env.console, context);
298-
}
292+
GO_HOME_WHEN_DONE.run_end_of_program(context);
299293
return true;
300294
}
301295

SerialPrograms/Source/PokemonLZA/Programs/ShinyHunting/PokemonLZA_AutoFossil.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "CommonFramework/Notifications/EventNotificationOption.h"
1515
#include "CommonFramework/Notifications/EventNotificationsTable.h"
1616
#include "NintendoSwitch/NintendoSwitch_SingleSwitchProgram.h"
17+
#include "NintendoSwitch/Options/NintendoSwitch_GoHomeWhenDoneOption.h"
1718
#include "PokemonLA/Options/PokemonLA_MiscOptions.h"
1819

1920
namespace PokemonAutomation{
@@ -48,7 +49,7 @@ class AutoFossil : public SingleSwitchProgramInstance{
4849
EventNotificationOption FOUND_SHINY_OR_ALPHA;
4950

5051
BooleanCheckBoxOption TAKE_VIDEO;
51-
BooleanCheckBoxOption GO_HOME_WHEN_DONE;
52+
GoHomeWhenDoneOption GO_HOME_WHEN_DONE;
5253

5354
EventNotificationOption NOTIFICATION_STATUS;
5455
EventNotificationsOption NOTIFICATIONS;

0 commit comments

Comments
 (0)