Skip to content

Commit 320c152

Browse files
naussikaGin
authored andcommitted
warn use if shiny detection options set to notify all
1 parent cf22203 commit 320c152

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ void enter_wild_zone_entrance(ConsoleHandle& console, ProControllerContext& cont
116116
void ShinyHunt_WildZoneEntrance::program(SingleSwitchProgramEnvironment& env, ProControllerContext& context) {
117117
ShinyHunt_WildZoneEntrance_Descriptor::Stats& stats =
118118
env.current_stats<ShinyHunt_WildZoneEntrance_Descriptor::Stats>();
119+
120+
if (SHINY_DETECTED.ACTION == ShinySoundDetectedAction::NOTIFY_ON_ALL) {
121+
throw UserSetupError(env.console, "Shiny would be detected/notified at most once. Choose one of the other 2 options");
122+
}
119123

120124
uint8_t shiny_count = 0;
121125

@@ -153,7 +157,7 @@ void ShinyHunt_WildZoneEntrance::program(SingleSwitchProgramEnvironment& env, Pr
153157
SHINY_DETECTED.on_shiny_sound(env, env.console, context, shiny_count, shiny_coefficient);
154158
}
155159

156-
// continue with shiny detection if pointless
160+
// continue with shiny sound detection is pointless
157161
if (SHINY_DETECTED.ACTION != ShinySoundDetectedAction::STOP_PROGRAM) {
158162
while (true) {
159163
send_program_status_notification(env, NOTIFICATION_STATUS);

0 commit comments

Comments
 (0)