Skip to content

Commit c357ae8

Browse files
committed
Shiny sound can play multiple times.
1 parent bb95cfb commit c357ae8

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

SerialPrograms/Source/PokemonLZA/Options/PokemonLZA_ShinyDetectedAction.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,25 @@ ShinyDetectedActionOption::ShinyDetectedActionOption(
5858
ImageAttachmentMode::JPG,
5959
{"Notifs", "Showcase"}
6060
)
61+
, NOTES(
62+
"<font color=\"red\">"
63+
"The shiny sound is not a reliable measure of shinies encountered. "
64+
"First, the sound only plays on a smaller radius than the spawn radius, so the vast majority of shinies are inaudible. "
65+
"Secondly, it may play multiple times for the same shiny, so it may overcount. "
66+
"You will still need to manually run around to see if any shinies spawned out-of-range.<\font>"
67+
)
6168
{
6269
if (!DESCRIPTION.text().empty()){
63-
PA_ADD_OPTION(DESCRIPTION);
70+
PA_ADD_STATIC(DESCRIPTION);
6471
}
6572
PA_ADD_OPTION(ACTION);
6673
PA_ADD_OPTION(MAX_COUNT);
6774
PA_ADD_OPTION(TAKE_VIDEO);
6875
PA_ADD_OPTION(SCREENSHOT_DELAY);
6976

70-
on_config_value_changed(this);
77+
PA_ADD_STATIC(NOTES);
78+
79+
ShinyDetectedActionOption::on_config_value_changed(this);
7180

7281
ACTION.add_listener(*this);
7382
}

SerialPrograms/Source/PokemonLZA/Options/PokemonLZA_ShinyDetectedAction.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ShinyDetectedActionOption : public GroupOption, public ConfigOption::Liste
3535
ShinyDetectedActionOption(
3636
std::string label, std::string description,
3737
std::string default_delay,
38-
ShinyDetectedActionType default_action = ShinyDetectedActionType::STOP_AFTER_COUNT
38+
ShinyDetectedActionType default_action = ShinyDetectedActionType::IGNORE
3939
);
4040

4141
bool stop_on_shiny(uint8_t current_count) const;
@@ -48,6 +48,8 @@ class ShinyDetectedActionOption : public GroupOption, public ConfigOption::Liste
4848
BooleanCheckBoxOption TAKE_VIDEO;
4949
MillisecondsOption SCREENSHOT_DELAY;
5050
EventNotificationOption NOTIFICATIONS;
51+
52+
StaticTextOption NOTES;
5153
};
5254

5355

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_ShinyHunt_Bench.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,7 @@ std::unique_ptr<StatsTracker> ShinyHunt_Bench_Descriptor::make_stats() const{
6262

6363

6464
ShinyHunt_Bench::ShinyHunt_Bench()
65-
: SHINY_DETECTED(
66-
"Shiny Detected",
67-
"<font color=\"red\">The shiny sound plays on a smaller radius than the shiny spawn radius. "
68-
"Therefore most shinies will be inaudible and will not be detected by this program. "
69-
"You will still need to manually run around to see if any shinies spawned out-of-range.<\font>",
70-
"2000ms"
71-
)
65+
: SHINY_DETECTED("Shiny Detected", "", "2000ms")
7266
, NOTIFICATION_STATUS("Status Update", true, false, std::chrono::seconds(3600))
7367
, NOTIFICATIONS({
7468
&NOTIFICATION_STATUS,
@@ -79,7 +73,7 @@ ShinyHunt_Bench::ShinyHunt_Bench()
7973
})
8074
{
8175
PA_ADD_STATIC(SHINY_REQUIRES_AUDIO);
82-
PA_ADD_STATIC(SHINY_DETECTED);
76+
PA_ADD_OPTION(SHINY_DETECTED);
8377
PA_ADD_OPTION(NOTIFICATIONS);
8478
}
8579

0 commit comments

Comments
 (0)