File tree Expand file tree Collapse file tree 3 files changed +68
-0
lines changed
Source/PokemonLZA/Options Expand file tree Collapse file tree 3 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ /* Hyperspace Reward Option
2+ *
3+ * From: https://github.com/PokemonAutomation/
4+ *
5+ */
6+
7+ #include " CommonFramework/Logging/Logger.h"
8+ #include " PokemonLZA/Resources/PokemonLZA_HyperspaceRewardNames.h"
9+ #include " PokemonLZA_HyperspaceRewardOption.h"
10+
11+ namespace PokemonAutomation {
12+ namespace NintendoSwitch {
13+ namespace PokemonLZA {
14+
15+ StringSelectDatabase make_hyperspace_reward_database (){
16+ StringSelectDatabase ret;
17+ for (const auto & slug : HYPERSPACE_REWARD_SLUGS ()){
18+ const HyperspaceRewardNames& data = get_hyperspace_reward_name (slug);
19+ ret.add_entry (StringSelectEntry (slug, data.display_name ()));
20+ }
21+ return ret;
22+ }
23+ const StringSelectDatabase& HYPERSPACE_REWARD_DATABASE (){
24+ static StringSelectDatabase database = make_hyperspace_reward_database ();
25+ return database;
26+ }
27+
28+
29+ HyperspaceRewardCell::HyperspaceRewardCell (
30+ const std::string& default_slug
31+ )
32+ : StringSelectCell(
33+ HYPERSPACE_REWARD_DATABASE (),
34+ LockMode::LOCK_WHILE_RUNNING,
35+ default_slug
36+ )
37+ {}
38+
39+
40+ }
41+ }
42+ }
Original file line number Diff line number Diff line change 1+ /* Hyperspace Reward Option
2+ *
3+ * From: https://github.com/PokemonAutomation/
4+ *
5+ */
6+
7+ #ifndef PokemonAutomation_PokemonLZA_HyperspaceRewardOption_H
8+ #define PokemonAutomation_PokemonLZA_HyperspaceRewardOption_H
9+
10+ #include " CommonTools/Options/StringSelectOption.h"
11+
12+ namespace PokemonAutomation {
13+ namespace NintendoSwitch {
14+ namespace PokemonLZA {
15+
16+ class HyperspaceRewardCell : public StringSelectCell {
17+ public:
18+ HyperspaceRewardCell (const std::string& default_slug);
19+ };
20+
21+ }
22+ }
23+ }
24+ #endif
Original file line number Diff line number Diff line change @@ -1619,6 +1619,8 @@ file(GLOB LIBRARY_SOURCES
16191619 Source /PokemonLZA/InferenceTraining/PokemonLZA_GenerateLocationNameOCR.h
16201620 Source /PokemonLZA/Options /PokemonLZA_BattleAIOption.cpp
16211621 Source /PokemonLZA/Options /PokemonLZA_BattleAIOption.h
1622+ Source /PokemonLZA/Options /PokemonLZA_HyperspaceRewardOption.cpp
1623+ Source /PokemonLZA/Options /PokemonLZA_HyperspaceRewardOption.h
16221624 Source /PokemonLZA/Options /PokemonLZA_ShinyDetectedAction.cpp
16231625 Source /PokemonLZA/Options /PokemonLZA_ShinyDetectedAction.h
16241626 Source /PokemonLZA/PokemonLZA_Panels.cpp
You can’t perform that action at this time.
0 commit comments