Skip to content

Commit 60c9ce4

Browse files
kichithewolfGin890
authored andcommitted
hyperspace reward option
1 parent 9c3b10d commit 60c9ce4

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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

SerialPrograms/SourceFiles.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)