Skip to content

Commit 8d3fa35

Browse files
committed
Revert walk_forward_until_dialog() changes.
1 parent 9cb4312 commit 8d3fa35

27 files changed

+80
-185
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void checkpoint_02(
131131
env.console.log("Go to the kitchen, talk with mom");
132132
env.console.overlay().add_log("Go to the kitchen, talk with mom", COLOR_WHITE);
133133
pbf_move_left_joystick(context, {0, -1}, 2000ms, 160ms);
134-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms, 0, 128);
134+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 0, 128);
135135

136136
env.console.log("clear_dialog: Talk with Mom.");
137137
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 5, {});
@@ -140,7 +140,7 @@ void checkpoint_02(
140140
env.console.log("Go to the front door, talk with Clavell");
141141
env.console.overlay().add_log("Go to the front door, talk with Clavell", COLOR_WHITE);
142142
pbf_move_left_joystick(context, 230, 200, 2000ms, 160ms);
143-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms, 255, 128);
143+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 255, 128);
144144

145145
env.console.log("clear_dialog: Talk with Clavell at front door.");
146146
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 5, {});
@@ -162,15 +162,15 @@ void checkpoint_02(
162162
pbf_move_left_joystick(context, 0, 0, 3000ms, 160ms);
163163
pbf_move_left_joystick(context, 0, 128, 3000ms, 160ms);
164164
pbf_move_left_joystick(context, {0, -1}, 4000ms, 160ms);
165-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms, 0, 128);
165+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 0, 128);
166166

167167
env.console.log("clear_dialog: Talk with Clavell at living room.");
168168
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 10, {});
169169

170170
context.wait_for_all_requests();
171171
env.console.log("Go outside, receive Rotom Phone");
172172
env.console.overlay().add_log("Go outside, receive Rotom Phone", COLOR_WHITE);
173-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms, 245, 230);
173+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 245, 230);
174174

175175
env.console.log("clear_dialog: Talk with Clavell outside. Receive Rotom phone. Stop when detect overworld.");
176176
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::WHITE_A_BUTTON});
@@ -201,7 +201,7 @@ void checkpoint_03(
201201
pbf_move_left_joystick(context, {-1, 0}, 240ms, 400ms);
202202

203203
direction.change_direction(env.program_info(), env.console, context, 4.62);
204-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20000ms);
204+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20);
205205

206206
context.wait_for_all_requests();
207207
env.console.log("Entered Nemona's house");

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void checkpoint_04(
8585
direction.change_direction(env.program_info(), env.console, context, 4.55);
8686
pbf_move_left_joystick(context, 128, 0, 600, 50);
8787
direction.change_direction(env.program_info(), env.console, context, 5.27);
88-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 160ms);
88+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 20);
8989

9090
context.wait_for_all_requests();
9191
env.console.log("Starting battle...");

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,8 @@ void checkpoint_05(
9292
direction.change_direction(env.program_info(), env.console, context, 1.92);
9393
pbf_move_left_joystick(context, 128, 0, 7000ms, 400ms);
9494
direction.change_direction(env.program_info(), env.console, context, 1.13);
95-
walk_forward_until_dialog(
96-
env.program_info(),
97-
env.console,
98-
context,
99-
NavigationMovementMode::DIRECTIONAL_ONLY,
100-
20000ms
101-
);
102-
95+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20);
96+
10397
context.wait_for_all_requests();
10498
env.console.log("Get mom's sandwich");
10599
env.console.overlay().add_log("Get mom's sandwich", COLOR_WHITE);

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,7 @@ void checkpoint_08(
9292
context.wait_for_all_requests();
9393
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 10, {});
9494
env.console.log("Go to Legendary pokemon laying on the beach.");
95-
walk_forward_until_dialog(
96-
env.program_info(),
97-
env.console,
98-
context,
99-
NavigationMovementMode::DIRECTIONAL_SPAM_A,
100-
30000ms
101-
);
95+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 30);
10296

10397
env.console.log("clear_dialog: Offer Miraidon/Koraidon a sandwich.");
10498
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 10, {});
@@ -145,14 +139,7 @@ void checkpoint_08(
145139
realign_player(env.program_info(), stream, context, PlayerRealignMode::REALIGN_NO_MARKER, 150, 20, 20);
146140
pbf_move_left_joystick(context, 128, 0, 1000, 50);
147141
realign_player(env.program_info(), stream, context, PlayerRealignMode::REALIGN_NO_MARKER, 160, 20, 20);
148-
walk_forward_until_dialog(
149-
env.program_info(),
150-
env.console,
151-
context,
152-
NavigationMovementMode::DIRECTIONAL_ONLY,
153-
60000ms,
154-
128, 0
155-
);
142+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 128, 0);
156143
}
157144
);
158145

@@ -203,14 +190,7 @@ void checkpoint_08(
203190
);
204191

205192
env.console.log("overworld_navigation: Go to Houndoom.");
206-
walk_forward_until_dialog(
207-
env.program_info(),
208-
env.console,
209-
context,
210-
NavigationMovementMode::DIRECTIONAL_ONLY,
211-
60000ms,
212-
128, 0
213-
);
193+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 128, 0);
214194

215195
mash_button_till_overworld(env.console, context, BUTTON_A);
216196

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,7 @@ void checkpoint_13(
105105
context.wait_for_all_requests();
106106
realign_player(info, env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 0, 80, 50);
107107
walk_forward_while_clear_front_path(info, env.console, context, 500);
108-
walk_forward_until_dialog(
109-
info,
110-
env.console,
111-
context,
112-
NavigationMovementMode::DIRECTIONAL_ONLY,
113-
30000ms
114-
);
108+
walk_forward_until_dialog(info, env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 30);
115109
});
116110

117111
env.console.log("clear_dialog: Talk with Nemona at Mesagoza gate. Stop when detect battle.");
@@ -157,13 +151,7 @@ void checkpoint_14(
157151
// realign going straight
158152
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 128, 0, 100);
159153
// walk forward until hit dialog at top of stairs
160-
walk_forward_until_dialog(
161-
env.program_info(),
162-
env.console,
163-
context,
164-
NavigationMovementMode::DIRECTIONAL_ONLY,
165-
60000ms
166-
);
154+
walk_forward_until_dialog( env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60);
167155
// clear dialog until battle. with prompt, battle
168156
env.console.log("clear_dialog: Talk with Team Star at the top of the stairs. Stop when detect battle.");
169157
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::PROMPT_DIALOG, CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW});
@@ -206,13 +194,7 @@ void checkpoint_15(
206194
// realign going straight
207195
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
208196
// walk forward until hit dialog inside the school
209-
walk_forward_until_dialog(
210-
env.program_info(),
211-
env.console,
212-
context,
213-
NavigationMovementMode::DIRECTIONAL_ONLY,
214-
60000ms
215-
);
197+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60);
216198

217199
env.console.log("clear_dialog: Talk with Nemona, Clavell, and Jacq inside the school. Stop when detect overworld.");
218200
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60,

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void checkpoint_17(
156156
context.wait_for_all_requests();
157157

158158
// walk backwards until dialog
159-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20000ms, 128, 255);
159+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20, 128, 255);
160160
env.console.log("Talk with Cassiopeia.");
161161
mash_button_till_overworld(env.console, context, BUTTON_A, 360);
162162

@@ -277,7 +277,7 @@ void checkpoint_20(
277277
env.console.log("Leave dorm for schoolyard.");
278278
mash_button_till_overworld(env.console, context, BUTTON_A, 360);
279279

280-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms, 128, 0);
280+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60, 128, 0);
281281

282282
env.console.log("Talk to Nemona, Arven, Cassiopeia.");
283283
clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 16,

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void checkpoint_24(
135135
context.wait_for_all_requests();
136136
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
137137
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
138-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20000ms);
138+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20);
139139
},
140140
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
141141
pbf_move_left_joystick(context, 0, 0, 100, 20);
@@ -145,7 +145,7 @@ void checkpoint_24(
145145
// enter gym building. talk go Nemona
146146
mash_button_till_overworld(env.console, context, BUTTON_A, 360);
147147
// talk to receptionist
148-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms);
148+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10);
149149
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD});
150150

151151
pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms);
@@ -184,7 +184,7 @@ void checkpoint_25(
184184
// section 1.1. keep walking forward and talk to Olive roll NPC
185185
do_action_and_monitor_for_battles(env.program_info(), env.console, context,
186186
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
187-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms);
187+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10);
188188
}
189189
);
190190
mash_button_till_overworld(env.console, context, BUTTON_A);
@@ -207,7 +207,7 @@ void checkpoint_25(
207207

208208
// section 5. battle first NPC
209209
direction.change_direction(env.program_info(), env.console, context, 1.485);
210-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms, 128, 20);
210+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10, 128, 20);
211211
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW});
212212
env.console.log("Battle Olive Roll NPC 1.");
213213
run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
@@ -227,7 +227,7 @@ void checkpoint_25(
227227

228228
// section 9. battle second NPC
229229
direction.change_direction(env.program_info(), env.console, context, 4.275);
230-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms, 128, 20);
230+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10, 128, 20);
231231
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW});
232232
env.console.log("Battle Olive Roll NPC 2.");
233233
run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
@@ -261,7 +261,7 @@ void checkpoint_26(
261261
reset_game_from_home(env.program_info(), env.console, context);
262262

263263
// talk to Olive roll NPC
264-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms, 128, 20);
264+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10, 128, 20);
265265
mash_button_till_overworld(env.console, context, BUTTON_A);
266266

267267
// section 1

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void checkpoint_28(
128128
wait_for_overworld(env.program_info(), env.console, context);
129129

130130
// talk to receptionist
131-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms);
131+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10);
132132
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::PROMPT_DIALOG, CallbackEnum::DIALOG_ARROW});
133133

134134
// battle Katy

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void checkpoint_35(
115115

116116
pbf_move_left_joystick(context, 128, 0, 120, 100);
117117
direction.change_direction(env.program_info(), env.console, context, 5.11);
118-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 160ms);
118+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20);
119119
mash_button_till_overworld(env.console, context, BUTTON_A);
120120

121121
});

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void checkpoint_37(
113113
128, 0, 30, 10, false);
114114
// section 3. set marker to shop/Kofu
115115
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 0, 140, 27);
116-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20000ms);
116+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 20);
117117

118118
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::PROMPT_DIALOG, CallbackEnum::DIALOG_ARROW});
119119
env.console.log("Battle Kofu's assistant.");
@@ -166,7 +166,7 @@ void checkpoint_38(
166166

167167
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
168168
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
169-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 18000ms);
169+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 18);
170170
},
171171
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
172172
pbf_move_left_joystick(context, 255, 0, 800ms, 400ms);
@@ -177,7 +177,7 @@ void checkpoint_38(
177177
mash_button_till_overworld(env.console, context, BUTTON_A, 360);
178178

179179
// talk to reception. Battle Kofu
180-
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10000ms);
180+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 10);
181181
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::PROMPT_DIALOG, CallbackEnum::DIALOG_ARROW});
182182
env.console.log("Battle Water Gym.");
183183
run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);

0 commit comments

Comments
 (0)