Skip to content

Commit fe6666b

Browse files
committed
Increment segment number at the beginning of the segment, instead of at the end.
1 parent e22675c commit fe6666b

25 files changed

+50
-52
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void AutoStory_Segment_00::run_segment(
3939
ProControllerContext& context,
4040
AutoStoryOptions options
4141
) const{
42-
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
42+
// AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
4343

4444
context.wait_for_all_requests();
4545
env.console.log("Start Segment 00: Intro Cutscene", COLOR_ORANGE);
@@ -48,8 +48,6 @@ void AutoStory_Segment_00::run_segment(
4848

4949
context.wait_for_all_requests();
5050
env.console.log("End Segment 00: Intro Cutscene", COLOR_GREEN);
51-
stats.m_segment++;
52-
env.update_stats();
5351
}
5452

5553

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ void AutoStory_Segment_01::run_segment(
5353
) const{
5454
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
5555

56+
stats.m_segment++;
57+
env.update_stats();
5658
context.wait_for_all_requests();
5759
env.console.log("Start Segment 01: Pick Starter", COLOR_ORANGE);
5860

@@ -62,8 +64,6 @@ void AutoStory_Segment_01::run_segment(
6264

6365
context.wait_for_all_requests();
6466
env.console.log("End Segment 01: Pick Starter", COLOR_GREEN);
65-
stats.m_segment++;
66-
env.update_stats();
6767

6868
}
6969

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ void AutoStory_Segment_02::run_segment(
4949
) const{
5050
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
5151

52+
stats.m_segment++;
53+
env.update_stats();
5254
context.wait_for_all_requests();
5355
env.console.log("Start Segment 02: First Nemona Battle", COLOR_ORANGE);
5456

5557
checkpoint_04(env, context, options.notif_status_update);
5658

5759
context.wait_for_all_requests();
58-
env.console.log("End Segment 02: First Nemona Battle", COLOR_GREEN);
59-
stats.m_segment++;
60-
env.update_stats();
60+
env.console.log("End Segment 02: First Nemona Battle", COLOR_GREEN);
6161

6262
}
6363

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ std::string AutoStory_Segment_03::end_text() const{
4444
void AutoStory_Segment_03::run_segment(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options) const{
4545
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
4646

47+
stats.m_segment++;
48+
env.update_stats();
4749
context.wait_for_all_requests();
4850
env.console.log("Start Segment 03: Catch Tutorial", COLOR_ORANGE);
4951

@@ -53,8 +55,6 @@ void AutoStory_Segment_03::run_segment(SingleSwitchProgramEnvironment& env, ProC
5355

5456
context.wait_for_all_requests();
5557
env.console.log("End Segment 03: Catch Tutorial", COLOR_GREEN);
56-
stats.m_segment++;
57-
env.update_stats();
5858

5959
}
6060

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ void AutoStory_Segment_04::run_segment(
4949
) const{
5050
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
5151

52+
stats.m_segment++;
53+
env.update_stats();
5254
context.wait_for_all_requests();
5355
env.console.log("Start Segment 04: Rescue Legendary", COLOR_ORANGE);
5456

5557
checkpoint_08(env, context, options.notif_status_update);
5658

5759
context.wait_for_all_requests();
5860
env.console.log("End Segment 04: Rescue Legendary", COLOR_GREEN);
59-
stats.m_segment++;
60-
env.update_stats();
6161

6262
}
6363

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ void AutoStory_Segment_05::run_segment(
4848
) const{
4949
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
5050

51+
stats.m_segment++;
52+
env.update_stats();
5153
context.wait_for_all_requests();
5254
env.console.log("Start Segment 05: First Arven Battle", COLOR_ORANGE);
5355

@@ -56,8 +58,6 @@ void AutoStory_Segment_05::run_segment(
5658

5759
context.wait_for_all_requests();
5860
env.console.log("End Segment 05: First Arven Battle", COLOR_GREEN);
59-
stats.m_segment++;
60-
env.update_stats();
6161

6262
}
6363

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ void AutoStory_Segment_06::run_segment(
4747
) const{
4848
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
4949

50+
stats.m_segment++;
51+
env.update_stats();
5052
context.wait_for_all_requests();
5153
env.console.log("Start Segment 06: Go to Los Platos", COLOR_ORANGE);
5254

5355
checkpoint_11(env, context, options.notif_status_update);
5456

5557
context.wait_for_all_requests();
5658
env.console.log("End Segment 06: Go to Los Platos", COLOR_GREEN);
57-
stats.m_segment++;
58-
env.update_stats();
5959

6060
}
6161

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ void AutoStory_Segment_07::run_segment(
4747
) const{
4848
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
4949

50+
stats.m_segment++;
51+
env.update_stats();
5052
context.wait_for_all_requests();
5153
env.console.log("Start Segment 07: Go to Mesagoza South", COLOR_ORANGE);
5254

@@ -64,8 +66,6 @@ void AutoStory_Segment_07::run_segment(
6466

6567
context.wait_for_all_requests();
6668
env.console.log("End Segment 07: Go to Mesagoza South", COLOR_GREEN);
67-
stats.m_segment++;
68-
env.update_stats();
6969

7070
}
7171

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ void AutoStory_Segment_08::run_segment(
4545
) const{
4646
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
4747

48+
stats.m_segment++;
49+
env.update_stats();
4850
context.wait_for_all_requests();
4951
env.console.log("Start Segment 08: Beat Team Star and arrive at School", COLOR_ORANGE);
5052

@@ -55,8 +57,6 @@ void AutoStory_Segment_08::run_segment(
5557

5658
context.wait_for_all_requests();
5759
env.console.log("End Segment 08: Beat Team Star and arrive at School", COLOR_GREEN);
58-
stats.m_segment++;
59-
env.update_stats();
6060

6161
}
6262

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ void AutoStory_Segment_09::run_segment(
4545
) const{
4646
AutoStoryStats& stats = env.current_stats<AutoStoryStats>();
4747

48+
stats.m_segment++;
49+
env.update_stats();
4850
context.wait_for_all_requests();
4951
env.console.log("Start Segment 09: Complete tutorial", COLOR_ORANGE);
5052

@@ -56,8 +58,6 @@ void AutoStory_Segment_09::run_segment(
5658

5759
context.wait_for_all_requests();
5860
env.console.log("End Segment 09: Complete tutorial", COLOR_GREEN);
59-
stats.m_segment++;
60-
env.update_stats();
6161

6262
}
6363

0 commit comments

Comments
 (0)