diff --git a/SerialPrograms/Source/CommonFramework/Globals.cpp b/SerialPrograms/Source/CommonFramework/Globals.cpp index 163b81b11..4697b0995 100644 --- a/SerialPrograms/Source/CommonFramework/Globals.cpp +++ b/SerialPrograms/Source/CommonFramework/Globals.cpp @@ -23,7 +23,7 @@ namespace PokemonAutomation{ const bool IS_BETA_VERSION = true; const int PROGRAM_VERSION_MAJOR = 0; const int PROGRAM_VERSION_MINOR = 41; -const int PROGRAM_VERSION_PATCH = 4; +const int PROGRAM_VERSION_PATCH = 6; const std::string PROGRAM_VERSION_BASE = "v" + std::to_string(PROGRAM_VERSION_MAJOR) + diff --git a/SerialPrograms/Source/CommonFramework/Notifications/ProgramNotifications.cpp b/SerialPrograms/Source/CommonFramework/Notifications/ProgramNotifications.cpp index b667b604d..712a705d4 100644 --- a/SerialPrograms/Source/CommonFramework/Notifications/ProgramNotifications.cpp +++ b/SerialPrograms/Source/CommonFramework/Notifications/ProgramNotifications.cpp @@ -74,7 +74,7 @@ std::pair make_session_field( } if (current_stats){ text += "\n"; - text += current_stats->to_str(); + text += current_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN); if (!current_stats_addendum.empty()){ text += "\n"; text += current_stats_addendum; @@ -274,7 +274,10 @@ void send_program_notification_with_file( #endif const StatsTracker* historical_stats = env.historical_stats(); if (GlobalSettings::instance().ALL_STATS && historical_stats){ - messages.emplace_back("Historical Stats:", env.historical_stats()->to_str()); + messages.emplace_back( + "Historical Stats:", + env.historical_stats()->to_str(StatsTracker::DISPLAY_ON_SCREEN) + ); } send_raw_notification( env.logger(), @@ -318,7 +321,10 @@ void send_program_notification( #endif const StatsTracker* historical_stats = env.historical_stats(); if (GlobalSettings::instance().ALL_STATS && historical_stats){ - messages.emplace_back("Historical Stats:", env.historical_stats()->to_str()); + messages.emplace_back( + "Historical Stats:", + env.historical_stats()->to_str(StatsTracker::DISPLAY_ON_SCREEN) + ); } send_raw_notification( env.logger(), diff --git a/SerialPrograms/Source/CommonFramework/ProgramSession.cpp b/SerialPrograms/Source/CommonFramework/ProgramSession.cpp index 65c710b29..82c5e4160 100644 --- a/SerialPrograms/Source/CommonFramework/ProgramSession.cpp +++ b/SerialPrograms/Source/CommonFramework/ProgramSession.cpp @@ -57,14 +57,14 @@ const std::string& ProgramSession::identifier() const{ std::string ProgramSession::current_stats() const{ std::lock_guard lg(m_lock); if (m_current_stats){ - return m_current_stats->to_str(); + return m_current_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN); } return ""; } std::string ProgramSession::historical_stats() const{ std::lock_guard lg(m_lock); if (m_historical_stats){ - return m_historical_stats->to_str(); + return m_historical_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN); } return ""; } diff --git a/SerialPrograms/Source/CommonFramework/Tools/ProgramEnvironment.cpp b/SerialPrograms/Source/CommonFramework/Tools/ProgramEnvironment.cpp index 6ab6e604d..dbf0c153f 100644 --- a/SerialPrograms/Source/CommonFramework/Tools/ProgramEnvironment.cpp +++ b/SerialPrograms/Source/CommonFramework/Tools/ProgramEnvironment.cpp @@ -80,7 +80,7 @@ void ProgramEnvironment::update_stats(){ std::string ProgramEnvironment::historical_stats_str() const{ - return m_historical_stats ? m_historical_stats->to_str() : ""; + return m_historical_stats ? m_historical_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN) : ""; } diff --git a/SerialPrograms/Source/CommonFramework/Tools/StatsDatabase.cpp b/SerialPrograms/Source/CommonFramework/Tools/StatsDatabase.cpp index 8465a4e58..6257b6a75 100644 --- a/SerialPrograms/Source/CommonFramework/Tools/StatsDatabase.cpp +++ b/SerialPrograms/Source/CommonFramework/Tools/StatsDatabase.cpp @@ -40,7 +40,7 @@ const std::map STATS_DATABASE_ALIASES{ StatLine::StatLine(StatsTracker& tracker) : m_time(current_time_to_str()) - , m_stats(tracker.to_str()) + , m_stats(tracker.to_str(StatsTracker::SAVE_TO_STATS_FILE)) {} StatLine::StatLine(const std::string& line){ size_t pos = line.find(" - "); diff --git a/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.cpp b/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.cpp index 3e8f181a4..4fd6e44da 100644 --- a/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.cpp +++ b/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.cpp @@ -12,11 +12,11 @@ namespace PokemonAutomation{ -StatsTracker::Stat::Stat(std::string&& p_label, bool p_omit_if_zero) +StatsTracker::Stat::Stat(std::string&& p_label, DisplayMode p_display_node) : label(p_label) - , omit_if_zero(p_omit_if_zero) + , display_mode(p_display_node) {} -std::string StatsTracker::to_str() const{ +std::string StatsTracker::to_str(PrintMode mode) const{ std::map stats; for (const auto& item : m_stats){ auto alias = m_aliases.find(item.first); @@ -41,9 +41,29 @@ std::string StatsTracker::to_str() const{ if (iter != stats.end()){ count += iter->second; } - if (stat.omit_if_zero && count == 0){ - continue; + + switch (stat.display_mode){ + case ALWAYS_VISIBLE: + break; + case HIDDEN_IF_ZERO: + if (count == 0){ + continue; + }else{ + break; + } + case ALWAYS_HIDDEN: + switch (mode){ + case DISPLAY_ON_SCREEN: + continue; + case SAVE_TO_STATS_FILE: + if (count == 0){ + continue; + }else{ + break; + } + } } + if (!str.empty()){ str += " - "; } @@ -115,12 +135,12 @@ std::string stats_to_bar( if (!override_current.empty()){ current_str = override_current; }else if (current){ - current_str = current->to_str(); + current_str = current->to_str(StatsTracker::DISPLAY_ON_SCREEN); } std::string historical_str; if (historical){ - historical_str = historical->to_str(); + historical_str = historical->to_str(StatsTracker::DISPLAY_ON_SCREEN); } if (current_str.empty() && historical_str.empty()){ diff --git a/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.h b/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.h index f137e0049..29d034eae 100644 --- a/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.h +++ b/SerialPrograms/Source/CommonFramework/Tools/StatsTracking.h @@ -23,18 +23,28 @@ class StatsTracker{ StatsTracker() = default; virtual ~StatsTracker() = default; - virtual std::string to_str() const; + enum PrintMode{ + DISPLAY_ON_SCREEN, + SAVE_TO_STATS_FILE, + }; + virtual std::string to_str(PrintMode mode) const; void parse_and_append_line(const std::string& line); protected: - static constexpr bool HIDDEN_IF_ZERO = true; - static constexpr bool ALWAYS_VISIBLE = false; +// static constexpr bool HIDDEN_IF_ZERO = true; +// static constexpr bool ALWAYS_VISIBLE = false; + enum DisplayMode{ + ALWAYS_VISIBLE, + HIDDEN_IF_ZERO, + ALWAYS_HIDDEN, + }; + struct Stat{ std::string label; - bool omit_if_zero; - Stat(std::string&& p_label, bool p_omit_if_zero = ALWAYS_VISIBLE); + DisplayMode display_mode; + Stat(std::string&& p_label, DisplayMode p_display_node = ALWAYS_VISIBLE); }; std::vector m_display_order; diff --git a/SerialPrograms/Source/ComputerPrograms/Framework/ComputerProgramWidget.cpp b/SerialPrograms/Source/ComputerPrograms/Framework/ComputerProgramWidget.cpp index 4181edde5..e85f0e0ac 100644 --- a/SerialPrograms/Source/ComputerPrograms/Framework/ComputerProgramWidget.cpp +++ b/SerialPrograms/Source/ComputerPrograms/Framework/ComputerProgramWidget.cpp @@ -116,8 +116,8 @@ void ComputerProgramWidget::state_change(ProgramState state){ void ComputerProgramWidget::stats_update(const StatsTracker* current_stats, const StatsTracker* historical_stats){ QMetaObject::invokeMethod(this, [this, current_stats, historical_stats]{ m_stats_bar->set_stats( - current_stats == nullptr ? "" : current_stats->to_str(), - historical_stats == nullptr ? "" : historical_stats->to_str() + current_stats == nullptr ? "" : current_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN), + historical_stats == nullptr ? "" : historical_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN) ); }); } diff --git a/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_MultiSwitchProgramWidget.cpp b/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_MultiSwitchProgramWidget.cpp index dd2f0cda2..0c9b69a5f 100644 --- a/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_MultiSwitchProgramWidget.cpp +++ b/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_MultiSwitchProgramWidget.cpp @@ -143,8 +143,8 @@ void MultiSwitchProgramWidget2::state_change(ProgramState state){ void MultiSwitchProgramWidget2::stats_update(const StatsTracker* current_stats, const StatsTracker* historical_stats){ QMetaObject::invokeMethod(this, [this, current_stats, historical_stats]{ m_stats_bar->set_stats( - current_stats == nullptr ? "" : current_stats->to_str(), - historical_stats == nullptr ? "" : historical_stats->to_str() + current_stats == nullptr ? "" : current_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN), + historical_stats == nullptr ? "" : historical_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN) ); }); } diff --git a/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_SingleSwitchProgramWidget.cpp b/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_SingleSwitchProgramWidget.cpp index 092e6c217..ba21ef1d9 100644 --- a/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_SingleSwitchProgramWidget.cpp +++ b/SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_SingleSwitchProgramWidget.cpp @@ -134,8 +134,8 @@ void SingleSwitchProgramWidget2::state_change(ProgramState state){ void SingleSwitchProgramWidget2::stats_update(const StatsTracker* current_stats, const StatsTracker* historical_stats){ QMetaObject::invokeMethod(this, [this, current_stats, historical_stats]{ m_stats_bar->set_stats( - current_stats == nullptr ? "" : current_stats->to_str(), - historical_stats == nullptr ? "" : historical_stats->to_str() + current_stats == nullptr ? "" : current_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN), + historical_stats == nullptr ? "" : historical_stats->to_str(StatsTracker::DISPLAY_ON_SCREEN) ); }); } diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/Eggs/PokemonBDSP_EggAutonomousState.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/Eggs/PokemonBDSP_EggAutonomousState.cpp index ba50f4b56..25a9e87da 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/Eggs/PokemonBDSP_EggAutonomousState.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/Eggs/PokemonBDSP_EggAutonomousState.cpp @@ -43,7 +43,7 @@ EggAutonomousStats::EggAutonomousStats() , m_shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Eggs Hatched"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("Fetch Attempts"); m_display_order.emplace_back("Fetch Success"); m_display_order.emplace_back("Shinies"); diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute210.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute210.cpp index c86fb1e9e..e9def6f34 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute210.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute210.cpp @@ -43,7 +43,7 @@ struct MoneyFarmerRoute210_Descriptor::Stats : public StatsTracker{ , m_react(m_stats["React"]) { m_display_order.emplace_back("Searches"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("No React"); m_display_order.emplace_back("React"); } diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute212.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute212.cpp index 4e0d04c53..a9834282a 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute212.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute212.cpp @@ -45,7 +45,7 @@ struct MoneyFarmerRoute212_Descriptor::Stats : public StatsTracker{ , m_both(m_stats["Both"]) { m_display_order.emplace_back("Searches"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("No React"); m_display_order.emplace_back("Man Only"); m_display_order.emplace_back("Woman Only"); diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/Glitches/PokemonBDSP_CloneItemsBoxCopy2.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/Glitches/PokemonBDSP_CloneItemsBoxCopy2.cpp index 7ec2ee8c6..97ac42d72 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/Glitches/PokemonBDSP_CloneItemsBoxCopy2.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/Glitches/PokemonBDSP_CloneItemsBoxCopy2.cpp @@ -42,7 +42,7 @@ struct CloneItemsBoxCopy2_Descriptor::Stats : public StatsTracker{ // , m_resets(m_stats["Resets"]) { m_display_order.emplace_back("Boxes Cloned"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); // m_display_order.emplace_back("Resets"); } std::atomic& m_boxes; diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/ShinyHunting/PokemonBDSP_StarterReset.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/ShinyHunting/PokemonBDSP_StarterReset.cpp index 9e5b2d409..84b600a4a 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/ShinyHunting/PokemonBDSP_StarterReset.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/ShinyHunting/PokemonBDSP_StarterReset.cpp @@ -42,7 +42,7 @@ struct StarterReset_Descriptor::Stats : public PokemonSwSh::ShinyHuntTracker{ : ShinyHuntTracker(false) , m_shiny_starly(m_stats["Shiny Starly"]) { - m_display_order.emplace_back("Shiny Starly", true); + m_display_order.emplace_back("Shiny Starly", HIDDEN_IF_ZERO); } std::atomic& m_shiny_starly; }; diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/Trading/PokemonBDSP_TradeRoutines.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/Trading/PokemonBDSP_TradeRoutines.cpp index 6611a09a4..0587a489d 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/Trading/PokemonBDSP_TradeRoutines.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/Trading/PokemonBDSP_TradeRoutines.cpp @@ -26,7 +26,7 @@ TradeStats::TradeStats() , m_errors(m_stats["Errors"]) { m_display_order.emplace_back("Trades"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } diff --git a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoBattleGrinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoBattleGrinder.cpp index 27888f77e..1581f5014 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoBattleGrinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoBattleGrinder.cpp @@ -58,8 +58,8 @@ class IngoBattleGrinder_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Battles"); m_display_order.emplace_back("Turns"); m_display_order.emplace_back("Lead Move Attempts"); - m_display_order.emplace_back("Faint Switches", true); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Faint Switches", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& battles; diff --git a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoMoveGrinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoMoveGrinder.cpp index 2832b70d8..7bcefdfbc 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoMoveGrinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_IngoMoveGrinder.cpp @@ -53,8 +53,8 @@ class IngoMoveGrinder_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Battles"); m_display_order.emplace_back("Turns"); m_display_order.emplace_back("Move Attempts"); - m_display_order.emplace_back("Faint Switches", true); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Faint Switches", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& battles; diff --git a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_LeapGrinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_LeapGrinder.cpp index fd5f4fad6..ef47037d6 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_LeapGrinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_LeapGrinder.cpp @@ -50,7 +50,7 @@ class LeapGrinder_Descriptor::Stats : public StatsTracker{ , leap_shinies(m_stats["Leap Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("Leaps"); m_display_order.emplace_back("Found"); m_display_order.emplace_back("Enroute Shinies"); diff --git a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_MagikarpMoveGrinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_MagikarpMoveGrinder.cpp index ae3fdd40b..081dd9761 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_MagikarpMoveGrinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_MagikarpMoveGrinder.cpp @@ -47,7 +47,7 @@ class MagikarpMoveGrinder_Descriptor::Stats : public StatsTracker{ { m_display_order.emplace_back("Magikarp"); m_display_order.emplace_back("Move Attempts"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& magikarp; diff --git a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_NuggetFarmerHighlands.cpp b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_NuggetFarmerHighlands.cpp index 8377627b4..ab2199788 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_NuggetFarmerHighlands.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_NuggetFarmerHighlands.cpp @@ -54,10 +54,10 @@ class NuggetFarmerHighlands_Descriptor::Stats : public StatsTracker, public Shin , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Charm", true); - m_display_order.emplace_back("Coin", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Charm", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Coin", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_TenacityCandyFarmer.cpp b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_TenacityCandyFarmer.cpp index f37ff573c..b2248e724 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_TenacityCandyFarmer.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_TenacityCandyFarmer.cpp @@ -49,9 +49,9 @@ class TenacityCandyFarmer_Descriptor::Stats : public StatsTracker{ , errors(m_stats["Errors"]) { m_display_order.emplace_back("Battles"); - m_display_order.emplace_back("Faint Switches", true); - m_display_order.emplace_back("Fourth Moves", true); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Faint Switches", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Fourth Moves", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& battles; diff --git a/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_DistortionWaiter.cpp b/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_DistortionWaiter.cpp index 54c1e97ee..c2116bffb 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_DistortionWaiter.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_DistortionWaiter.cpp @@ -43,8 +43,8 @@ class DistortionWaiter_Descriptor::Stats : public StatsTracker{ { m_display_order.emplace_back("Minutes Waited"); m_display_order.emplace_back("Distortions"); - m_display_order.emplace_back("Other Notifications", true); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Other Notifications", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& minutes_waited; diff --git a/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_OutbreakFinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_OutbreakFinder.cpp index e7d84b2a7..c65b5be0f 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_OutbreakFinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_OutbreakFinder.cpp @@ -154,12 +154,12 @@ class OutbreakFinder_Descriptor::Stats : public StatsTracker{ , matches(m_stats["Matches"]) { m_display_order.emplace_back("Checks"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("Outbreaks"); m_display_order.emplace_back("MMOs"); m_display_order.emplace_back("MMO Pokemon"); m_display_order.emplace_back("Stars"); - m_display_order.emplace_back("Matches", true); + m_display_order.emplace_back("Matches", HIDDEN_IF_ZERO); } std::atomic& checks; diff --git a/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_RamanasIslandCombee.cpp b/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_RamanasIslandCombee.cpp index 41391321f..40fe46a5b 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_RamanasIslandCombee.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_RamanasIslandCombee.cpp @@ -56,8 +56,8 @@ class RamanasCombeeFinder_Descriptor::Stats : public StatsTracker{ { m_display_order.emplace_back("Attempts"); m_display_order.emplace_back("Trees"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Blackouts", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Blackouts", HIDDEN_IF_ZERO); m_display_order.emplace_back("Found"); m_display_order.emplace_back("Enroute Shinies"); m_aliases["Shinies"] = "Enroute Shinies"; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_BurmyFinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_BurmyFinder.cpp index 9dbdb8998..5ca185671 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_BurmyFinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_BurmyFinder.cpp @@ -59,8 +59,8 @@ class BurmyFinder_Descriptor::Stats : public StatsTracker{ { m_display_order.emplace_back("Attempts"); m_display_order.emplace_back("Trees"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Blackouts", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Blackouts", HIDDEN_IF_ZERO); m_display_order.emplace_back("Found"); m_display_order.emplace_back("Enroute Shinies"); m_display_order.emplace_back("Tree Alphas"); diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_CrobatFinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_CrobatFinder.cpp index 9f0ecb247..ac9e201bf 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_CrobatFinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_CrobatFinder.cpp @@ -44,8 +44,8 @@ class CrobatFinder_Descriptor::Stats : public StatsTracker, public ShinyStatIncr , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_FroslassFinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_FroslassFinder.cpp index 060431b00..09d9b89bf 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_FroslassFinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_FroslassFinder.cpp @@ -45,8 +45,8 @@ class FroslassFinder_Descriptor::Stats : public StatsTracker, public ShinyStatIn , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_GalladeFinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_GalladeFinder.cpp index 1e7de3d7a..a0dd17527 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_GalladeFinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_GalladeFinder.cpp @@ -42,8 +42,8 @@ class GalladeFinder_Descriptor::Stats : public StatsTracker, public ShinyStatInc , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_PostMMOSpawnReset.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_PostMMOSpawnReset.cpp index 3d221d60b..d96e72b5e 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_PostMMOSpawnReset.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_PostMMOSpawnReset.cpp @@ -42,8 +42,8 @@ class PostMMOSpawnReset_Descriptor::Stats : public StatsTracker, public ShinySta , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-CustomPath.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-CustomPath.cpp index 59860295b..c72fd5140 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-CustomPath.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-CustomPath.cpp @@ -48,8 +48,8 @@ class ShinyHuntCustomPath_Descriptor::Stats : public StatsTracker, public ShinyS , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-FlagPin.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-FlagPin.cpp index 2c4bd9b94..999b0bd63 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-FlagPin.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_ShinyHunt-FlagPin.cpp @@ -44,8 +44,8 @@ class ShinyHuntFlagPin_Descriptor::Stats : public StatsTracker, public ShinyStat , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_UnownFinder.cpp b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_UnownFinder.cpp index 8f3559782..f7bc80af4 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_UnownFinder.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_UnownFinder.cpp @@ -52,8 +52,8 @@ class UnownFinder_Descriptor::Stats : public StatsTracker, public ShinyStatIncre , shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Attempts"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } virtual void add_shiny() override{ shinies++; diff --git a/SerialPrograms/Source/PokemonLA/Programs/Trading/PokemonLA_TradeRoutines.cpp b/SerialPrograms/Source/PokemonLA/Programs/Trading/PokemonLA_TradeRoutines.cpp index 6964977a2..fa8ced8d8 100644 --- a/SerialPrograms/Source/PokemonLA/Programs/Trading/PokemonLA_TradeRoutines.cpp +++ b/SerialPrograms/Source/PokemonLA/Programs/Trading/PokemonLA_TradeRoutines.cpp @@ -30,7 +30,7 @@ TradeStats::TradeStats() , m_errors(m_stats["Errors"]) { m_display_order.emplace_back("Trades"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassAttachItems.cpp b/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassAttachItems.cpp index 726e64a6d..6b41a66b8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassAttachItems.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassAttachItems.cpp @@ -51,7 +51,7 @@ struct MassAttachItems_Descriptor::Stats : public StatsTracker{ // m_display_order.emplace_back("Replaced"); m_display_order.emplace_back("Empty Slots"); m_display_order.emplace_back("Eggs"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_boxes; std::atomic& m_attached; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassRelease.cpp b/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassRelease.cpp index 6b292253b..bc6f2d687 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassRelease.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Boxes/PokemonSV_MassRelease.cpp @@ -50,7 +50,7 @@ struct MassRelease_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Empty Slots"); m_display_order.emplace_back("Shinies"); m_display_order.emplace_back("Eggs"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_boxes; std::atomic& m_released; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggAutonomous.cpp b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggAutonomous.cpp index 9d326e277..5ff6098c7 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggAutonomous.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggAutonomous.cpp @@ -62,7 +62,7 @@ struct EggAutonomous_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Hatched"); m_display_order.emplace_back("Shinies"); m_display_order.emplace_back("Kept"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_aliases.emplace(STRING_POKEMON + " Kept", "Kept"); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggFetcher.cpp b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggFetcher.cpp index 91e71f27e..a26867024 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggFetcher.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggFetcher.cpp @@ -43,7 +43,7 @@ struct EggFetcher_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Sandwiches"); m_display_order.emplace_back("Fetch Attempts"); m_display_order.emplace_back("Eggs"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_sandwiches; std::atomic& m_attempts; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp index 18247b811..c4a4f6df0 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp @@ -41,7 +41,7 @@ struct EggHatcher_Descriptor::Stats : public StatsTracker{ , m_errors(m_stats["Errors"]) { m_display_order.emplace_back("Hatched"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_hatched; std::atomic& m_errors; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_AuctionFarmer.cpp b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_AuctionFarmer.cpp index 581bb6155..8ed57c106 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_AuctionFarmer.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_AuctionFarmer.cpp @@ -63,7 +63,7 @@ struct AuctionFarmer_Descriptor::Stats : public StatsTracker { m_display_order.emplace_back("Resets"); m_display_order.emplace_back("Auctions"); m_display_order.emplace_back("Spent Money"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_resets; std::atomic& m_auctions; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ESPTraining.cpp b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ESPTraining.cpp index 6c6a3e7a0..7aff8e81f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ESPTraining.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ESPTraining.cpp @@ -52,7 +52,7 @@ struct ESPTraining_Descriptor::Stats : public StatsTracker { m_display_order.emplace_back("Excitement"); m_display_order.emplace_back("Anger"); m_display_order.emplace_back("Times Cleared"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_emotions; std::atomic& m_joy; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_GimmighoulChestFarmer.cpp b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_GimmighoulChestFarmer.cpp index 6c2b3cf46..3cb742544 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_GimmighoulChestFarmer.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_GimmighoulChestFarmer.cpp @@ -52,7 +52,7 @@ struct GimmighoulChestFarmer_Descriptor::Stats : public StatsTracker { m_display_order.emplace_back("Chests farmed"); m_display_order.emplace_back("Wild interrupts"); m_display_order.emplace_back("Resets"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& pokemon_fainted; std::atomic& wild_interrupts; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_LPFarmer.cpp b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_LPFarmer.cpp index d4df85702..e4cf7dc75 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_LPFarmer.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_LPFarmer.cpp @@ -44,7 +44,7 @@ struct LPFarmer_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Day Skips"); m_display_order.emplace_back("Resets"); m_display_order.emplace_back("Fetches"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_skips; std::atomic& m_resets; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.cpp b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.cpp index f1cc833ce..9f1d7c380 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.cpp @@ -59,7 +59,7 @@ struct TournamentFarmer_Descriptor::Stats : public StatsTracker { m_display_order.emplace_back("Losses"); m_display_order.emplace_back("Money made"); m_display_order.emplace_back("Items matched"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& tournaments; std::atomic& battles; diff --git a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsReset.cpp b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsReset.cpp index 2179def25..71305bfc5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsReset.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsReset.cpp @@ -54,7 +54,7 @@ struct StatsReset_Descriptor::Stats : public StatsTracker { m_display_order.emplace_back("Balls Thrown"); m_display_order.emplace_back("Catches"); m_display_order.emplace_back("Matches"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& resets; std::atomic& balls; diff --git a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsResetBloodmoon.cpp b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsResetBloodmoon.cpp index fdd8a9098..9aeab2f67 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsResetBloodmoon.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_StatsResetBloodmoon.cpp @@ -53,7 +53,7 @@ struct StatsResetBloodmoon_Descriptor::Stats : public StatsTracker { m_display_order.emplace_back("Resets"); m_display_order.emplace_back("Catches"); m_display_order.emplace_back("Matches"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& resets; std::atomic& catches; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp index f3d441e4c..c60fa322d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp @@ -49,7 +49,7 @@ struct CloneItems101_Descriptor::Stats : public StatsTracker{ , m_errors(m_stats["Errors"]) { m_display_order.emplace_back("Cloned"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_cloned; std::atomic& m_errors; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp index 0e9595d77..66549c2e1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp @@ -68,10 +68,10 @@ struct RideCloner101_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Wins"); m_display_order.emplace_back("Losses"); m_display_order.emplace_back("Skipped"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); m_display_order.emplace_back("Cloned"); - m_display_order.emplace_back("Failed", true); + m_display_order.emplace_back("Failed", HIDDEN_IF_ZERO); } std::atomic& m_skips; // std::atomic& m_raids; diff --git a/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_ShinyHunt-AreaZeroPlatform.cpp b/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_ShinyHunt-AreaZeroPlatform.cpp index 36afbec9d..363311ec1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_ShinyHunt-AreaZeroPlatform.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_ShinyHunt-AreaZeroPlatform.cpp @@ -65,7 +65,7 @@ struct ShinyHuntAreaZeroPlatform_Descriptor::Stats : public LetsGoEncounterBotSt m_display_order.insert(m_display_order.begin() + 2, {"Sandwiches", HIDDEN_IF_ZERO}); m_display_order.insert(m_display_order.begin() + 3, {"Auto Heals", HIDDEN_IF_ZERO}); m_display_order.insert(m_display_order.begin() + 4, {"Platform Resets", HIDDEN_IF_ZERO}); - m_display_order.insert(m_display_order.begin() + 5, {"Game Resets", HIDDEN_IF_ZERO}); + m_display_order.insert(m_display_order.begin() + 5, {"Game Resets", ALWAYS_HIDDEN}); m_display_order.insert(m_display_order.begin() + 6, {"Errors", HIDDEN_IF_ZERO}); } std::atomic& m_sandwiches; diff --git a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_AutoHost.cpp b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_AutoHost.cpp index 4cee9a79d..17ac49860 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_AutoHost.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_AutoHost.cpp @@ -71,8 +71,8 @@ struct AutoHost_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Total Raiders"); m_display_order.emplace_back("Wins"); m_display_order.emplace_back("Losses"); - m_display_order.emplace_back("Banned", true); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Banned", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_raids; std::atomic& m_empty; diff --git a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraMultiFarmer.cpp b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraMultiFarmer.cpp index f2098543f..405fc8394 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraMultiFarmer.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraMultiFarmer.cpp @@ -124,13 +124,13 @@ struct TeraMultiFarmer_Descriptor::Stats : public StatsTracker{ , m_errors(m_stats["Errors"]) { m_display_order.emplace_back("Raids"); - m_display_order.emplace_back("Empty Raids", true); - m_display_order.emplace_back("Full Raids", true); - m_display_order.emplace_back("Total Joiners", true); + m_display_order.emplace_back("Empty Raids", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Full Raids", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Total Joiners", HIDDEN_IF_ZERO); m_display_order.emplace_back("Wins"); m_display_order.emplace_back("Losses"); - m_display_order.emplace_back("Banned", true); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Banned", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } std::atomic& m_raids; std::atomic& m_empty; diff --git a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoller.cpp b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoller.cpp index 9ecd5af8b..970c7ce37 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoller.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoller.cpp @@ -68,8 +68,8 @@ struct TeraRoller_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Resets"); m_display_order.emplace_back("Raids"); m_display_order.emplace_back("Skipped"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } std::atomic& m_skips; std::atomic& m_resets; diff --git a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraSelfFarmer.cpp b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraSelfFarmer.cpp index aedaf4ed2..1621068c1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraSelfFarmer.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraSelfFarmer.cpp @@ -68,9 +68,9 @@ struct TeraSelfFarmer_Descriptor::Stats : public StatsTracker{ m_display_order.emplace_back("Wins"); m_display_order.emplace_back("Losses"); m_display_order.emplace_back("Skipped"); - m_display_order.emplace_back("Errors", true); - m_display_order.emplace_back("Caught", true); - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Caught", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } std::atomic& m_skips; std::atomic& m_raids; diff --git a/SerialPrograms/Source/PokemonSV/Programs/Trading/PokemonSV_TradeRoutines.cpp b/SerialPrograms/Source/PokemonSV/Programs/Trading/PokemonSV_TradeRoutines.cpp index c06425d91..d4cb9b577 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Trading/PokemonSV_TradeRoutines.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Trading/PokemonSV_TradeRoutines.cpp @@ -30,7 +30,7 @@ TradeStats::TradeStats() , m_errors(m_stats["Errors"]) { m_display_order.emplace_back("Trades"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); } diff --git a/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Notifications.cpp b/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Notifications.cpp index c9e3efc31..822c85a69 100644 --- a/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Notifications.cpp +++ b/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Notifications.cpp @@ -41,7 +41,7 @@ void send_status_notification( embeds.emplace_back("Last Boss:", std::move(str)); } { - std::string str = runtime.path_stats.to_str(); + std::string str = runtime.path_stats.to_str(StatsTracker::DISPLAY_ON_SCREEN); status_str += "Current Path: " + str + "\n"; embeds.emplace_back("Current Path:", std::move(str)); } @@ -111,7 +111,7 @@ void send_raid_notification( } if (path_stats.runs() > 0){ - embeds.emplace_back("Current Path:", path_stats.to_str()); + embeds.emplace_back("Current Path:", path_stats.to_str(StatsTracker::DISPLAY_ON_SCREEN)); } send_program_notification( @@ -173,7 +173,7 @@ void send_shiny_notification( embeds.emplace_back(STRING_POKEMON + ":", std::move(str)); } if (path_stats.runs() > 0){ - embeds.emplace_back("Current Path:", path_stats.to_str()); + embeds.emplace_back("Current Path:", path_stats.to_str(StatsTracker::DISPLAY_ON_SCREEN)); } send_program_notification( diff --git a/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Stats.h b/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Stats.h index 3fb080521..999a5aa95 100644 --- a/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Stats.h +++ b/SerialPrograms/Source/PokemonSwSh/MaxLair/Framework/PokemonSwSh_MaxLair_Stats.h @@ -25,11 +25,11 @@ struct Stats : public StatsTracker{ , m_shiny_legendary(m_stats["Shiny Legendary"]) { m_display_order.emplace_back("Runs"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("Wins"); m_display_order.emplace_back("Catches"); m_display_order.emplace_back("Shinies"); - m_display_order.emplace_back("Shiny Legendary", true); + m_display_order.emplace_back("Shiny Legendary", HIDDEN_IF_ZERO); } void add_run(size_t catches){ diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/DenHunting/PokemonSwSh_DaySkipperStats.h b/SerialPrograms/Source/PokemonSwSh/Programs/DenHunting/PokemonSwSh_DaySkipperStats.h index cb7d3dc66..b9bd93cc4 100644 --- a/SerialPrograms/Source/PokemonSwSh/Programs/DenHunting/PokemonSwSh_DaySkipperStats.h +++ b/SerialPrograms/Source/PokemonSwSh/Programs/DenHunting/PokemonSwSh_DaySkipperStats.h @@ -25,9 +25,9 @@ class SkipperStats : public StatsTracker{ m_display_order.emplace_back(Stat("Skips Issued")); } - virtual std::string to_str() const override{ + virtual std::string to_str(PrintMode mode) const override{ if (total_skips == 0){ - return StatsTracker::to_str(); + return StatsTracker::to_str(mode); }else{ return "Skips Issued: " + tostr_u_commas(issued) + diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_EggAutonomous.cpp b/SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_EggAutonomous.cpp index eff502c37..765af9d3c 100644 --- a/SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_EggAutonomous.cpp +++ b/SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_EggAutonomous.cpp @@ -70,7 +70,7 @@ class EggAutonomous_Descriptor::Stats : public StatsTracker{ , m_shinies(m_stats["Shinies"]) { m_display_order.emplace_back("Eggs Hatched"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("Fetch Attempts"); m_display_order.emplace_back("Fetch Success"); m_display_order.emplace_back("Shinies"); @@ -229,7 +229,7 @@ void EggAutonomous::program(SingleSwitchProgramEnvironment& env, BotBaseContext& if (run_batch(env, context, stats)){ break; } - env.log("stats: " + stats.to_str()); + env.log("stats: " + stats.to_str(StatsTracker::DISPLAY_ON_SCREEN)); // We successfully finish one egg loop iteration without any error thrown. // So we reset the failure counter. consecutive_failures = 0; diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp index 217a6dfa4..c805f7f84 100644 --- a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp +++ b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp @@ -65,11 +65,11 @@ class CramomaticRNG_Descriptor::Stats : public StatsTracker{ { m_display_order.emplace_back("Iterations"); m_display_order.emplace_back("Seed Reads"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); m_display_order.emplace_back("Balls"); m_display_order.emplace_back("Apriballs"); m_display_order.emplace_back("Safari/Sport Balls"); - m_display_order.emplace_back("Bonus", true); + m_display_order.emplace_back("Bonus", HIDDEN_IF_ZERO); } public: diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/ShinyHuntUnattended/PokemonSwSh_CurryHunter.cpp b/SerialPrograms/Source/PokemonSwSh/Programs/ShinyHuntUnattended/PokemonSwSh_CurryHunter.cpp index b10ae7df8..7f97199b4 100644 --- a/SerialPrograms/Source/PokemonSwSh/Programs/ShinyHuntUnattended/PokemonSwSh_CurryHunter.cpp +++ b/SerialPrograms/Source/PokemonSwSh/Programs/ShinyHuntUnattended/PokemonSwSh_CurryHunter.cpp @@ -39,7 +39,7 @@ struct CurryHunter_Descriptor::Stats : public ShinyHuntTracker{ , m_attempts(m_stats["Attempts"]) { for (auto& item : m_display_order){ - item.omit_if_zero = true; + item.display_mode = HIDDEN_IF_ZERO; } m_display_order.insert(m_display_order.begin(), Stat("Attempts")); } diff --git a/SerialPrograms/Source/PokemonSwSh/ShinyHuntTracker.cpp b/SerialPrograms/Source/PokemonSwSh/ShinyHuntTracker.cpp index d23dccf90..17e0bc400 100644 --- a/SerialPrograms/Source/PokemonSwSh/ShinyHuntTracker.cpp +++ b/SerialPrograms/Source/PokemonSwSh/ShinyHuntTracker.cpp @@ -23,15 +23,15 @@ ShinyHuntTracker::ShinyHuntTracker(bool shiny_types) , m_square_shinies(m_stats["Square Shinies"]) { m_display_order.emplace_back("Encounters"); - m_display_order.emplace_back("Errors", true); + m_display_order.emplace_back("Errors", HIDDEN_IF_ZERO); if (shiny_types){ - m_display_order.emplace_back("Star Shinies", true); - m_display_order.emplace_back("Square Shinies", true); - m_display_order.emplace_back("Unknown Shinies", true); + m_display_order.emplace_back("Star Shinies", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Square Shinies", HIDDEN_IF_ZERO); + m_display_order.emplace_back("Unknown Shinies", HIDDEN_IF_ZERO); }else{ - m_display_order.emplace_back("Shinies", true); + m_display_order.emplace_back("Shinies", HIDDEN_IF_ZERO); } - m_display_order.emplace_back("Caught", true); + m_display_order.emplace_back("Caught", HIDDEN_IF_ZERO); } ShinyHuntTracker::ShinyHuntTracker(bool shiny_types, std::map aliases) : ShinyHuntTracker(shiny_types)