Skip to content

Commit e0e2f8a

Browse files
committed
move DailyHighlightRNG under developer mode
1 parent 6f81f45 commit e0e2f8a

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

SerialPrograms/Source/PokemonSwSh/PokemonSwSh_Panels.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
180180
ret.emplace_back("---- RNG ----");
181181
ret.emplace_back(make_single_switch_program<SeedFinder_Descriptor, SeedFinder>());
182182
ret.emplace_back(make_single_switch_program<CramomaticRNG_Descriptor, CramomaticRNG>());
183-
ret.emplace_back(make_single_switch_program<DailyHighlightRNG_Descriptor, DailyHighlightRNG>());
184183

185184
ret.emplace_back("---- Multi-Switch Programs ----");
186185
ret.emplace_back(make_multi_switch_program<SynchronizedSpinning_Descriptor, SynchronizedSpinning>());
@@ -202,7 +201,8 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
202201
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedIoATrade_Descriptor, ShinyHuntUnattendedIoATrade>());
203202

204203
if (PreloadSettings::instance().DEVELOPER_MODE){
205-
// ret.emplace_back("---- Untested/Beta/WIP ----");
204+
ret.emplace_back("---- Untested/Beta/WIP ----");
205+
ret.emplace_back(make_single_switch_program<DailyHighlightRNG_Descriptor, DailyHighlightRNG>());
206206
}
207207
if (PreloadSettings::instance().DEVELOPER_MODE){
208208
ret.emplace_back("---- Developer Tools ----");

SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_DailyHighlightRNG.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*
77
*/
88

9-
#include "Common/Cpp/PrettyPrint.h"
109
#include "CommonFramework/Exceptions/ProgramFinishedException.h"
1110
#include "CommonFramework/Exceptions/OperationFailedException.h"
1211
#include "CommonFramework/Notifications/ProgramNotifications.h"
@@ -105,12 +104,6 @@ DailyHighlightRNG::DailyHighlightRNG()
105104
, m_advanced_options(
106105
"<font size=4><b>Advanced Options:</b> You should not need to touch anything below here.</font>"
107106
)
108-
, MOVE_TIME("Move time:", LockMode::LOCK_WHILE_RUNNING, "1280 ms")
109-
, MOVE_TIME2("Move time right:", LockMode::LOCK_WHILE_RUNNING, "1280 ms")
110-
, LEFT_X("Left X:", LockMode::LOCK_WHILE_RUNNING, 207)
111-
, LEFT_Y("Left Y:", LockMode::LOCK_WHILE_RUNNING, 1)
112-
, RIGHT_X("Right X:", LockMode::LOCK_WHILE_RUNNING, 127)
113-
, RIGHT_Y("Right Y:", LockMode::LOCK_WHILE_RUNNING, 127)
114107
, MAX_UNKNOWN_ADVANCES(
115108
"<b>Max Unknown advances:</b><br>How many advances to check when updating the rng state.",
116109
LockMode::LOCK_WHILE_RUNNING,
@@ -205,7 +198,8 @@ void DailyHighlightRNG::buy_highlight(SingleSwitchProgramEnvironment& env, ProCo
205198
);
206199

207200
if (ret < 0) {
208-
env.
201+
DailyHighlightRNG_Descriptor::Stats& stats = env.current_stats<DailyHighlightRNG_Descriptor::Stats>();
202+
stats.errors++;
209203
OperationFailedException::fire(
210204
ErrorReport::SEND_ERROR_REPORT,
211205
"Could not detect dialog.",
@@ -249,7 +243,7 @@ uint8_t DailyHighlightRNG::calibrate_num_npc_from_party(SingleSwitchProgramEnvir
249243
const uint8_t MAX_NPCS = 6; // Usually either 1 or 2, sometimes 3 or 4, maybe 5 or 6 -> high numbers suggest bad npc state
250244
std::vector<Xoroshiro128PlusState> rng_states;
251245

252-
for (size_t npcs = 0; npcs <= MAX_NPCS; npcs++) {
246+
for (uint8_t npcs = 0; npcs <= MAX_NPCS; npcs++) {
253247
Xoroshiro128PlusState temp_state = predict_state_after_menu_close(rng.get_state(), npcs);
254248
Xoroshiro128Plus temp_rng(temp_state);
255249

0 commit comments

Comments
 (0)