Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,12 @@ void GlobalSettings::load_json(const JsonValue& json){
}

STATIC_GLOBALS.load_json(json);
const bool developer_mode = STATIC_GLOBALS.DEVELOPER_MODE;
BatchOption::load_json(json);

// cout << "DEVELOPER_MODE: " << STATIC_GLOBALS.DEVELOPER_MODE << endl;
// cout << "INTERNAL_DEVELOPER_MODE: " << STATIC_GLOBALS.INTERNAL_DEVELOPER_MODE << endl;
const bool developer_mode = STATIC_GLOBALS.DEVELOPER_MODE;

ConfigOptionState devmode_visibility = developer_mode
? ConfigOptionState::ENABLED
: ConfigOptionState::HIDDEN;
Expand Down
11 changes: 9 additions & 2 deletions SerialPrograms/Source/CommonFramework/StaticGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ const std::set<std::string> TOKENS{
"6643d9fe87b3e54dc75dfac8ac22f0cc8bd17f6a8a786debf5fc4c517ee65469",
"8e48e38e49bffc8462ada9d2d9d850d5b3b5c9529d20978c09bc548bc9a614a4",
"7694adee4419d62c6a923c4efc9e7b41def7b96bb84ea882701b0bf2e8c13bee",
"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", // jw's token.
"e8d168bc482e96553ea9f9ecaea5a817474dbccc2a6a228a6bde67f2b2aa2889", // James' token.
};

const std::set<std::string> INTERNAL_TOKENS{
"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", // jw's token.
"7555b7c63481cad42306718c67e7f9def5bfd1da8f6cd299ccd3d7dc95f307ae", // Kuro's token.
"3d475b46d121fc24559d100de2426feaa53cd6578aac2817c4857a610ccde2dd", // kichi's token.
"9b41db8175b5f248a78e738c7bd63a36e33b57953cb4e80ccdd13c2a7e892eec", // Dalton's token.
Expand All @@ -47,7 +50,11 @@ void StaticGlobals::load_json(const JsonValue& json){
hash.push(dev_token->c_str(), dev_token->size());
hash.finish();
hash.get_hash_hex();
DEVELOPER_MODE = TOKENS.find(hash.get_hash_hex()) != TOKENS.end();

bool internal_dev = INTERNAL_TOKENS.find(hash.get_hash_hex()) != INTERNAL_TOKENS.end();
bool regular_dev = TOKENS.find(hash.get_hash_hex()) != TOKENS.end();
DEVELOPER_MODE = regular_dev || internal_dev;
INTERNAL_DEVELOPER_MODE = internal_dev;
}

const JsonObject* debug_obj = obj->get_object("DEBUG");
Expand Down
1 change: 1 addition & 0 deletions SerialPrograms/Source/CommonFramework/StaticGlobals.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class StaticGlobals{
public:
bool NAUGHTY_MODE = false;
bool DEVELOPER_MODE = false;
bool INTERNAL_DEVELOPER_MODE = false;


// Debug color stats like those in:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
ret.emplace_back(make_single_switch_program<TestDudunsparceFormDetector_Descriptor, TestDudunsparceFormDetector>());
ret.emplace_back(make_computer_program<ComputerPrograms::UnitTestRunner_Descriptor, ComputerPrograms::UnitTestRunner>());
#ifdef PA_OFFICIAL
add_panels(ret);
if (STATIC_GLOBALS.INTERNAL_DEVELOPER_MODE){
add_panels(ret);
}
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion SerialPrograms/Source/PokemonSV/PokemonSV_Panels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
}

#ifdef PA_OFFICIAL
if (STATIC_GLOBALS.DEVELOPER_MODE){
if (STATIC_GLOBALS.INTERNAL_DEVELOPER_MODE){
ret.emplace_back("---- Research ----");
add_panels(ret);
}
Expand Down
Loading