Skip to content

Commit 15eefac

Browse files
kichithewolfGin890
authored andcommitted
update to work with newer hyperspace map function
1 parent c079fb7 commit 15eefac

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

SerialPrograms/Source/PokemonLZA/Inference/Map/PokemonLZA_MapIconDetector.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ enum class MapIconType{
3131
WildZone,
3232
WildZoneFlyable,
3333
BattleZone,
34-
HyperspaceBattleZone,
35-
HyperspaceWildZone,
36-
HyperspaceEntryWild,
37-
HyperspaceEntryBattle,
34+
HyperspaceBattleZone, //Icon in Lumiose
35+
HyperspaceWildZone, //Icon in Lumiose
36+
HyperspaceEntryWild, //Icon while in Hyperspace
37+
HyperspaceEntryBattle, //Icon while in Hyperspace
3838
};
3939

4040
const char* map_icon_type_to_string(MapIconType type);

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_BasicNavigation.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,13 @@ bool open_map(ConsoleHandle& console, ProControllerContext& context, bool zoom_t
113113
MapIconDetector flayble_cafe_icon(COLOR_ORANGE, MapIconType::CafeFlyable, icon_region, &console.overlay());
114114
MapIconDetector flyable_hyperspace_battle_zone_icon(COLOR_ORANGE, MapIconType::HyperspaceBattleZone, icon_region, &console.overlay());
115115
MapIconDetector flyable_hyperspace_wild_zone_icon(COLOR_ORANGE, MapIconType::HyperspaceWildZone, icon_region, &console.overlay());
116-
MapIconDetector flyable_hyperspace_entry_wild_icon(COLOR_ORANGE, MapIconType::HyperspaceEntryWild, icon_region, &console.overlay());
117-
MapIconDetector flyable_hyperspace_entry_battle_icon(COLOR_ORANGE, MapIconType::HyperspaceEntryBattle, icon_region, &console.overlay());
116+
118117
MapWatcher map_detector(COLOR_RED, &console.overlay());
119118
map_detector.attach_map_icon_detector(pokecenter_icon);
120119
map_detector.attach_map_icon_detector(flyable_building_icon);
121120
map_detector.attach_map_icon_detector(flayble_cafe_icon);
122121
map_detector.attach_map_icon_detector(flyable_hyperspace_battle_zone_icon);
123122
map_detector.attach_map_icon_detector(flyable_hyperspace_wild_zone_icon);
124-
map_detector.attach_map_icon_detector(flyable_hyperspace_entry_wild_icon);
125-
map_detector.attach_map_icon_detector(flyable_hyperspace_entry_battle_icon);
126123

127124
do{
128125
map_detector.reset_state();
@@ -181,7 +178,13 @@ void open_hyperspace_map(ConsoleHandle& console, ProControllerContext& context){
181178

182179
WallClock deadline = current_time() + 30s;
183180

181+
const ImageFloatBox icon_region{0.0, 0.089, 1.0, 0.911};
182+
MapIconDetector flyable_hyperspace_entry_wild_icon(COLOR_ORANGE, MapIconType::HyperspaceEntryWild, icon_region, &console.overlay());
183+
MapIconDetector flyable_hyperspace_entry_battle_icon(COLOR_ORANGE, MapIconType::HyperspaceEntryBattle, icon_region, &console.overlay());
184+
184185
MapWatcher map_detector(COLOR_RED, &console.overlay());
186+
map_detector.attach_map_icon_detector(flyable_hyperspace_entry_wild_icon);
187+
map_detector.attach_map_icon_detector(flyable_hyperspace_entry_battle_icon);
185188

186189
do{
187190
map_detector.reset_state();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ ShinyHunt_FlySpotReset::ShinyHunt_FlySpotReset()
7474
Route::NO_MOVEMENT
7575
)
7676
, NUM_RESETS(
77-
"<b>Resets:</b><br>Number of resets, for use when performing fly resets in Hyperspace Wild Zones. Each fly takes about 1 Cal. of time. Make sure to leave enough time to catch found shinies. Zero disables this option.",
77+
"<b>Hyperspace Resets:</b><br>Number of resets when running the Hyperspace Wild Zone route. Each fly takes about 1 Cal. of time. Make sure to leave enough time to catch found shinies.",
7878
LockMode::UNLOCK_WHILE_RUNNING,
79-
0, 0
79+
100, 1
8080
)
8181
, NOTIFICATION_STATUS("Status Update", true, false, std::chrono::seconds(3600))
8282
, NOTIFICATIONS({
@@ -270,7 +270,7 @@ void ShinyHunt_FlySpotReset::program(SingleSwitchProgramEnvironment& env, ProCon
270270
}
271271

272272
uint64_t num_resets_temp = NUM_RESETS;
273-
if (num_resets_temp != 0 && num_resets >= num_resets_temp){
273+
if (ROUTE == Route::HYPERSPACE_WILD_ZONE && num_resets >= num_resets_temp){
274274
env.log("Number of resets hit. Going to home to pause the game.");
275275
go_home(env.console, context);
276276
break;

0 commit comments

Comments
 (0)