Add achievements and stats menus to title screen menu
Update all relevant checks, especially in button callbacks, so that options, achievements, and stats are considered non-play mode menus, rather than just the options menu. Update test program so that it toggles through and performs a basic check of the menus on the title screen. The achievements and stats menus are just blank placeholders for now. Remove "max challenge" key from the player's progress file. The idea of locking certain challenges has been deprecated for a while. All the challenges are considered unlocked, so the max challenge index is just the last index of the challenges listed in the config file.
This commit is contained in:
parent
0b2e47b36c
commit
7efa02654f
@ -437,6 +437,12 @@
|
||||
},
|
||||
{
|
||||
"name": "OPTIONS"
|
||||
},
|
||||
{
|
||||
"name": "ACHIEVEMENTS"
|
||||
},
|
||||
{
|
||||
"name": "STATS"
|
||||
}
|
||||
],
|
||||
|
||||
|
136
src/Cakefoot.cpp
136
src/Cakefoot.cpp
@ -64,7 +64,6 @@ Cakefoot::Cakefoot(std::vector<nlohmann::json> configuration_merge) :
|
||||
{"current difficulty", 0},
|
||||
{"max difficulty", 0},
|
||||
{"current challenge", 1},
|
||||
{"max challenge", 5},
|
||||
{"current view", 0},
|
||||
{"max view", 0},
|
||||
{"total time", 0.0f},
|
||||
@ -135,13 +134,6 @@ Cakefoot::Cakefoot(std::vector<nlohmann::json> configuration_merge) :
|
||||
configuration()["progress"]["current level"] = 1;
|
||||
}
|
||||
|
||||
/* Enforce max challenge to 5 */
|
||||
configuration()["progress"]["max challenge"] = 5;
|
||||
if (configuration()("progress", "current challenge") > 5)
|
||||
{
|
||||
configuration()["progress"]["current challenge"] = 5;
|
||||
}
|
||||
|
||||
/* Load stat and achievement progress */
|
||||
fs::path stat_file_path = configuration()("storage", "stats file");
|
||||
if (!fs::exists(stat_file_path))
|
||||
@ -812,9 +804,15 @@ void Cakefoot::set_up_buttons()
|
||||
configuration()("button", "start alt scale")[1], 1.0f / 5.0f};
|
||||
}
|
||||
|
||||
/* Check challenge index */
|
||||
const nlohmann::json::string_t& challenge_name = configuration()("challenge", challenge_index, "name").
|
||||
get_ref<const nlohmann::json::string_t&>();
|
||||
bool play_mode_menu_active = challenge_name != "OPTIONS" && challenge_name != "ACHIEVEMENTS" &&
|
||||
challenge_name != "STATS";
|
||||
|
||||
/* Set up text button callbacks */
|
||||
button.at("start").on_state_change([&]([[maybe_unused]] bool state){
|
||||
if (configuration()("challenge", challenge_index, "name") == "NEW QUEST")
|
||||
if (challenge_name == "NEW QUEST")
|
||||
{
|
||||
configuration()["progress"]["quest level"] = 1;
|
||||
configuration()["progress"]["quest checkpoint"] = 0.0f;
|
||||
@ -825,7 +823,7 @@ void Cakefoot::set_up_buttons()
|
||||
challenge_index = 0;
|
||||
configuration()["progress"]["current challenge"] = challenge_index;
|
||||
}
|
||||
else if (configuration()("challenge", challenge_index, "name") == "ARCADE")
|
||||
else if (challenge_name == "ARCADE")
|
||||
{
|
||||
configuration()["progress"]["arcade level"] = 1;
|
||||
configuration()["progress"]["arcade checkpoint"] = 0.0f;
|
||||
@ -837,10 +835,14 @@ void Cakefoot::set_up_buttons()
|
||||
challenge_index = 3;
|
||||
configuration()["progress"]["current challenge"] = challenge_index;
|
||||
}
|
||||
else if (configuration()("challenge", challenge_index, "name") == "OPTIONS")
|
||||
else if (!play_mode_menu_active)
|
||||
{
|
||||
/* Move menu back to resume quest if game is started from the options sub-menu */
|
||||
button.at("challenge increment").press();
|
||||
while (configuration()("challenge", challenge_index, "name").get_ref<const nlohmann::json::string_t&>() !=
|
||||
"RESUME QUEST")
|
||||
{
|
||||
/* Move menu back to resume quest if game is started from a non-play mode menu */
|
||||
button.at("challenge increment").press();
|
||||
}
|
||||
}
|
||||
#if defined(__COOLMATH__)
|
||||
/* Coolmath API */
|
||||
@ -983,7 +985,7 @@ void Cakefoot::set_up_buttons()
|
||||
}
|
||||
else if (name == "challenge")
|
||||
{
|
||||
message << configuration()("challenge", challenge_index, "name").get<std::string>();
|
||||
message << challenge_name;
|
||||
}
|
||||
else if (name == "view")
|
||||
{
|
||||
@ -997,9 +999,8 @@ void Cakefoot::set_up_buttons()
|
||||
}
|
||||
button.at("profile decrement").on_state_change([&]([[maybe_unused]] bool state){
|
||||
/* Disable in arcade-only mode and resume game modes */
|
||||
if (!configuration()("display", "arcade only") &&
|
||||
configuration()("challenge", challenge_index, "name") != "RESUME QUEST" &&
|
||||
configuration()("challenge", challenge_index, "name") != "RESUME ARCADE")
|
||||
if (!configuration()("display", "arcade only") && challenge_name != "RESUME QUEST" &&
|
||||
challenge_name != "RESUME ARCADE")
|
||||
{
|
||||
if (--profile_index < 0)
|
||||
{
|
||||
@ -1013,9 +1014,8 @@ void Cakefoot::set_up_buttons()
|
||||
});
|
||||
button.at("profile increment").on_state_change([&]([[maybe_unused]] bool state){
|
||||
/* Disable in arcade-only mode and resume game modes */
|
||||
if (!configuration()("display", "arcade only") &&
|
||||
configuration()("challenge", challenge_index, "name") != "RESUME QUEST" &&
|
||||
configuration()("challenge", challenge_index, "name") != "RESUME ARCADE")
|
||||
if (!configuration()("display", "arcade only") && challenge_name != "RESUME QUEST" &&
|
||||
challenge_name != "RESUME ARCADE")
|
||||
{
|
||||
if (++profile_index > configuration()("progress", "max difficulty"))
|
||||
{
|
||||
@ -1037,7 +1037,7 @@ void Cakefoot::set_up_buttons()
|
||||
});
|
||||
button.at("level decrement").on_state_change([&]([[maybe_unused]] bool state){
|
||||
/* Only allow level select in level select mode */
|
||||
if (configuration()("challenge", challenge_index, "name") == "LEVEL SELECT")
|
||||
if (challenge_name == "LEVEL SELECT")
|
||||
{
|
||||
/* If the level is decreased below 1, wrap to the last level if the current difficulty is complete,
|
||||
* otherwise wrap to the max level unlocked. */
|
||||
@ -1061,7 +1061,7 @@ void Cakefoot::set_up_buttons()
|
||||
});
|
||||
button.at("level increment").on_state_change([&]([[maybe_unused]] bool state){
|
||||
/* Only allow level select in level select mode */
|
||||
if (configuration()("challenge", challenge_index, "name") == "LEVEL SELECT")
|
||||
if (challenge_name == "LEVEL SELECT")
|
||||
{
|
||||
/* If the level is increased past the total number of levels or past the max level unlocked on the current
|
||||
* difficulty, wrap the spinner back to 1. */
|
||||
@ -1082,7 +1082,7 @@ void Cakefoot::set_up_buttons()
|
||||
/* Only allow change when not in arcade-only or demo mode */
|
||||
if (!configuration()("display", "arcade only") && !configuration()("demo", "active"))
|
||||
{
|
||||
if (--challenge_index < 0) challenge_index = configuration()("progress", "max challenge");
|
||||
if (--challenge_index < 0) challenge_index = max_challenge();
|
||||
if (skip_resume_quest() || skip_resume_arcade() || skip_level_select())
|
||||
{
|
||||
button.at("challenge decrement").press();
|
||||
@ -1097,7 +1097,7 @@ void Cakefoot::set_up_buttons()
|
||||
/* Only allow change when not in arcade-only or demo mode */
|
||||
if (!configuration()("display", "arcade only") && !configuration()("demo", "active"))
|
||||
{
|
||||
if (++challenge_index > configuration()("progress", "max challenge")) challenge_index = 0;
|
||||
if (++challenge_index > max_challenge()) challenge_index = 0;
|
||||
if (skip_resume_quest() || skip_resume_arcade() || skip_level_select())
|
||||
{
|
||||
button.at("challenge increment").press();
|
||||
@ -1318,16 +1318,20 @@ void Cakefoot::set_up_buttons()
|
||||
|
||||
void Cakefoot::toggle_challenge()
|
||||
{
|
||||
const nlohmann::json::string_t& challenge_name = configuration()("challenge", challenge_index, "name").
|
||||
get_ref<const nlohmann::json::string_t&>();
|
||||
bool play_mode_menu_active = challenge_name != "OPTIONS" && challenge_name != "ACHIEVEMENTS" &&
|
||||
challenge_name != "STATS";
|
||||
|
||||
/* In resume modes, set the level select and difficulty to the saved values. */
|
||||
if (configuration()("challenge", challenge_index, "name") == "RESUME QUEST" ||
|
||||
configuration()("challenge", challenge_index, "name") == "OPTIONS")
|
||||
if (challenge_name == "RESUME QUEST" || !play_mode_menu_active)
|
||||
{
|
||||
level_select_index = configuration()("progress", "quest level").get<int>();
|
||||
profile_index = configuration()("progress", "quest difficulty").get<int>();
|
||||
configuration()["progress"]["current difficulty"] = profile_index;
|
||||
character.profile(configuration()("character", "profile", profile_index, "name"));
|
||||
}
|
||||
else if (configuration()("challenge", challenge_index, "name") == "RESUME ARCADE")
|
||||
else if (challenge_name == "RESUME ARCADE")
|
||||
{
|
||||
level_select_index = configuration()("progress", "arcade level").get<int>();
|
||||
profile_index = configuration()("progress", "arcade difficulty").get<int>();
|
||||
@ -1336,26 +1340,27 @@ void Cakefoot::toggle_challenge()
|
||||
}
|
||||
|
||||
/* In new game modes, set the level select to 1 and leave the difficulty unchanged. */
|
||||
else if (configuration()("challenge", challenge_index, "name") == "ARCADE" ||
|
||||
configuration()("challenge", challenge_index, "name") == "NEW QUEST")
|
||||
else if (challenge_name == "ARCADE" || challenge_name == "NEW QUEST")
|
||||
{
|
||||
level_select_index = 1;
|
||||
}
|
||||
|
||||
/* Save menu selection unless it's the options sub-menu */
|
||||
if (configuration()("challenge", challenge_index, "name") != "OPTIONS")
|
||||
/* Save menu selection if a play mode menu is active */
|
||||
if (play_mode_menu_active)
|
||||
{
|
||||
configuration()["progress"]["current challenge"] = challenge_index;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Save challenge selection as quest instead of options sub-menu */
|
||||
/* Save challenge selection as quest instead of non-play mode */
|
||||
if (configuration()("progress", "quest level") == 1 && configuration()("progress", "quest checkpoint") == 0.0f)
|
||||
{
|
||||
/* Resume */
|
||||
configuration()["progress"]["current challenge"] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* New */
|
||||
configuration()["progress"]["current challenge"] = 0;
|
||||
}
|
||||
}
|
||||
@ -2718,13 +2723,18 @@ void Cakefoot::respond(SDL_Event& event)
|
||||
|
||||
/* Build a list of title screen buttons that are currently active. */
|
||||
std::vector<std::string> title_menu {"start"};
|
||||
if (configuration()("challenge", challenge_index, "name") != "OPTIONS")
|
||||
const nlohmann::json::string_t& challenge_name = configuration()("challenge", challenge_index, "name").
|
||||
get_ref<const nlohmann::json::string_t&>();
|
||||
|
||||
/* The challenge spinner is always available unless explictly disabled */
|
||||
if (button.at("challenge decrement").enabled())
|
||||
{
|
||||
sb::extend(title_menu, {"challenge decrement", "challenge increment"});
|
||||
}
|
||||
|
||||
/* If a play mode menu is active, play mode spinner buttons are available. */
|
||||
if (challenge_name != "OPTIONS" && challenge_name != "ACHIEVEMENTS" && challenge_name != "STATS")
|
||||
{
|
||||
/* Check if the spinners are enabled before navigating to them. */
|
||||
if (button.at("challenge decrement").enabled())
|
||||
{
|
||||
sb::extend(title_menu, {"challenge decrement", "challenge increment"});
|
||||
}
|
||||
if (button.at("level decrement").enabled())
|
||||
{
|
||||
sb::extend(title_menu, {"level decrement", "level increment"});
|
||||
@ -2738,9 +2748,11 @@ void Cakefoot::respond(SDL_Event& event)
|
||||
sb::extend(title_menu, {"view decrement", "view increment"});
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
/* Sub-menu buttons are enabled in the options menu */
|
||||
else if (challenge_name == "OPTIONS")
|
||||
{
|
||||
sb::extend(title_menu, {"challenge decrement", "challenge increment", "fullscreen text", "bgm", "sfx", "exit"});
|
||||
sb::extend(title_menu, {"fullscreen text", "bgm", "sfx", "exit"});
|
||||
}
|
||||
|
||||
/* Ignore most events when play button or splash screen is active */
|
||||
@ -3390,6 +3402,11 @@ void Cakefoot::run(std::function<void(float)> draw, std::optional<std::function<
|
||||
sb::Game::run(draw, update);
|
||||
}
|
||||
|
||||
int Cakefoot::max_challenge() const
|
||||
{
|
||||
return configuration()("challenge").size() - 1;
|
||||
}
|
||||
|
||||
void Cakefoot::draw(float timestamp)
|
||||
{
|
||||
sb::Log::gl_errors("at beginning of update");
|
||||
@ -4057,9 +4074,13 @@ void Cakefoot::draw(float timestamp)
|
||||
/* Disable spinners if arcade prompt displayed*/
|
||||
if (!configuration()("display", "use arcade prompt"))
|
||||
{
|
||||
/* Always include challenge, but only include other spinners when options sub-menu is not active */
|
||||
/* Always include challenge, but only include other spinners when navigating a play mode menu */
|
||||
std::vector<std::string> names;
|
||||
if (configuration()("challenge", challenge_index, "name") != "OPTIONS")
|
||||
const nlohmann::json::string_t& challenge_name = configuration()(
|
||||
"challenge", challenge_index, "name").get_ref<const nlohmann::json::string_t&>();
|
||||
bool play_mode_menu_active = challenge_name != "OPTIONS" && challenge_name != "ACHIEVEMENTS" &&
|
||||
challenge_name != "STATS";
|
||||
if (play_mode_menu_active)
|
||||
{
|
||||
names = {"level select", "profile", "challenge", "view"};
|
||||
}
|
||||
@ -4080,9 +4101,8 @@ void Cakefoot::draw(float timestamp)
|
||||
glDrawArrays(GL_TRIANGLES, 0, label.at(name).attributes("position")->count());
|
||||
} }
|
||||
|
||||
/* If options sub-menu is not active, draw spinner buttons. Otherwise, draw options sub-menu
|
||||
* buttons. */
|
||||
if (configuration()("challenge", challenge_index, "name") != "OPTIONS")
|
||||
/* If play mode menu is active, draw spinner buttons. */
|
||||
if (play_mode_menu_active)
|
||||
{
|
||||
names = {
|
||||
"level decrement", "level increment", "profile decrement", "profile increment",
|
||||
@ -4091,15 +4111,22 @@ void Cakefoot::draw(float timestamp)
|
||||
}
|
||||
else
|
||||
{
|
||||
names = {"challenge decrement", "challenge increment", "bgm", "sfx"};
|
||||
if (configuration()("display", "fullscreen enabled"))
|
||||
/* Always draw challenge spinner */
|
||||
names = {"challenge decrement", "challenge increment"};
|
||||
|
||||
/* If options menu is active, draw sub-menu */
|
||||
if (challenge_name == "OPTIONS")
|
||||
{
|
||||
names.push_back("fullscreen text");
|
||||
}
|
||||
if (configuration()("display", "exit enabled"))
|
||||
{
|
||||
names.push_back("exit");
|
||||
} }
|
||||
names.push_back("bgm");
|
||||
names.push_back("sfx");
|
||||
if (configuration()("display", "fullscreen enabled"))
|
||||
{
|
||||
names.push_back("fullscreen text");
|
||||
}
|
||||
if (configuration()("display", "exit enabled"))
|
||||
{
|
||||
names.push_back("exit");
|
||||
} } }
|
||||
|
||||
/* Draw buttons */
|
||||
for (const std::string& name : names)
|
||||
@ -4197,6 +4224,7 @@ void Cakefoot::draw(float timestamp)
|
||||
label.at("clock").enable();
|
||||
glDrawArrays(GL_TRIANGLES, 0, label.at("clock").attributes("position")->count());
|
||||
|
||||
/* Draw HUD */
|
||||
if (level_index > 0 && static_cast<std::size_t>(level_index) < _configuration("levels").size() - 1)
|
||||
{
|
||||
/* Draw the original text level indicator */
|
||||
@ -4266,7 +4294,7 @@ void Cakefoot::draw(float timestamp)
|
||||
glDrawArrays(GL_TRIANGLES, 0, label.at(name).attributes("position")->count());
|
||||
} }
|
||||
|
||||
/* Draw scoreboard, QR, quest best, social, and auto save icon on title screen */
|
||||
/* Draw scoreboard, QR, quest best, social, auto save icon, achievements, and stats on title screen */
|
||||
if (level_index == 0)
|
||||
{
|
||||
/* Only draw scoreboard if arcade mode is selected */
|
||||
|
@ -902,6 +902,11 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* @return The maximum index of the challenge list
|
||||
*/
|
||||
int max_challenge() const;
|
||||
|
||||
protected:
|
||||
|
||||
/* Flag indicating whether or not to turn off collisions. Intended for automated testing of the game, using a mock
|
||||
|
@ -14,7 +14,7 @@
|
||||
"stdout enabled": true,
|
||||
"file enabled": true,
|
||||
"debug to file": true,
|
||||
"debug to stdout": true,
|
||||
"debug to stdout": false,
|
||||
"output directory": "local/log",
|
||||
"gl error": true
|
||||
},
|
||||
|
@ -42,7 +42,6 @@ nlohmann::json mock_progress_json = R"({
|
||||
"current level": 7,
|
||||
"current view": 2,
|
||||
"jackpot": 0,
|
||||
"max challenge": 5,
|
||||
"max difficulty": 0,
|
||||
"max level": 7,
|
||||
"max view": 2,
|
||||
@ -293,10 +292,12 @@ public:
|
||||
|
||||
void run(MockCakefoot& mock, int count = 2)
|
||||
{
|
||||
bool started = false;
|
||||
bool checked_challenges = false;
|
||||
int resets = 0;
|
||||
int downs = 0;
|
||||
int toggles = 0;
|
||||
std::size_t toggles = 0;
|
||||
std::size_t toggle_target = 0;
|
||||
const nlohmann::json& challenge_list = mock.cakefoot.configuration()("challenge");
|
||||
mock.cakefoot.run([&](float timestamp){
|
||||
if (mock.cakefoot.configuration()("progress", "quest deaths") > 2)
|
||||
{
|
||||
@ -304,16 +305,76 @@ void run(MockCakefoot& mock, int count = 2)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!started)
|
||||
mock.refresh_progress();
|
||||
std::size_t level = mock.cakefoot.configuration()("progress", "current level");
|
||||
const int& progress_challenge = mock.cakefoot.configuration()("progress", "current challenge").
|
||||
get_ref<const nlohmann::json::number_integer_t&>();
|
||||
if (!checked_challenges)
|
||||
{
|
||||
CHECK(mock.cakefoot.mock_audio().at("menu").playing());
|
||||
CHECK_FALSE(mock.cakefoot.mock_bgm().playing());
|
||||
sb::Delegate::post("any");
|
||||
started = true;
|
||||
if (downs++ == 0)
|
||||
{
|
||||
sb::Delegate::post("down");
|
||||
sb::Delegate::post("right");
|
||||
if (challenge_list.at(progress_challenge).at("name") == "RESUME QUEST")
|
||||
{
|
||||
toggle_target = challenge_list.size() - 1;
|
||||
}
|
||||
else if (challenge_list.at(progress_challenge).at("name") == "NEW QUEST")
|
||||
{
|
||||
toggle_target = challenge_list.size() - 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
CAPTURE(challenge_list.at(progress_challenge).at("name"));
|
||||
FAIL("Unsupported initial test conditions or menu code has failed");
|
||||
}
|
||||
}
|
||||
else if (toggles == 0)
|
||||
{
|
||||
if (challenge_list.at(progress_challenge).at("name") == "ARCADE")
|
||||
{
|
||||
toggles++;
|
||||
}
|
||||
sb::Delegate::post("any");
|
||||
}
|
||||
else if (toggles < toggle_target)
|
||||
{
|
||||
if (challenge_list.at(progress_challenge).at("name") != "ARCADE")
|
||||
{
|
||||
toggles++;
|
||||
sb::Delegate::post("any");
|
||||
}
|
||||
}
|
||||
else if (toggles == toggle_target)
|
||||
{
|
||||
CHECK(challenge_list.at(progress_challenge).at("name") == "ARCADE");
|
||||
CHECK(mock.cakefoot.mock_audio().at("menu").playing());
|
||||
CHECK_FALSE(mock.cakefoot.mock_bgm().playing());
|
||||
sb::Delegate::post("any");
|
||||
sb::Delegate::post("any");
|
||||
sb::Delegate::post("any");
|
||||
sb::Delegate::post("any");
|
||||
toggles += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (toggle_target == challenge_list.size() - 1)
|
||||
{
|
||||
CHECK(challenge_list.at(progress_challenge).at("name") == "RESUME QUEST");
|
||||
}
|
||||
else if (toggle_target == challenge_list.size() - 3)
|
||||
{
|
||||
CHECK(challenge_list.at(progress_challenge).at("name") == "NEW QUEST");
|
||||
}
|
||||
sb::Delegate::post("up");
|
||||
sb::Delegate::post("any");
|
||||
checked_challenges = true;
|
||||
toggles = 0;
|
||||
downs = 0;
|
||||
}
|
||||
}
|
||||
else if (mock.cakefoot.configuration()("progress", "max difficulty") < 1)
|
||||
{
|
||||
std::size_t level = mock.cakefoot.configuration()("progress", "current level");
|
||||
if (level < mock.cakefoot.configuration()("levels").size() - 2)
|
||||
{
|
||||
const nlohmann::json& world { mock.cakefoot.configuration()("world") };
|
||||
@ -326,6 +387,8 @@ void run(MockCakefoot& mock, int count = 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
CHECK(challenge_list.at(progress_challenge).at("name") == "RESUME QUEST");
|
||||
CHECK(mock.cakefoot.configuration()("progress", "quest level") == level);
|
||||
sb::Delegate::post("skip forward");
|
||||
}
|
||||
else
|
||||
@ -333,34 +396,49 @@ void run(MockCakefoot& mock, int count = 2)
|
||||
sb::Delegate::post("any");
|
||||
}
|
||||
}
|
||||
else if (resets++ < 1)
|
||||
else if (resets < 1)
|
||||
{
|
||||
if (count > 1)
|
||||
{
|
||||
sb::Delegate::post("reset");
|
||||
}
|
||||
else
|
||||
if (count < 2)
|
||||
{
|
||||
mock.cakefoot.flag_to_end();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb::Delegate::post("reset");
|
||||
resets++;
|
||||
}
|
||||
}
|
||||
else if (downs++ < 1)
|
||||
else if (downs++ == 0)
|
||||
{
|
||||
CHECK(challenge_list.at(progress_challenge).at("name") == "NEW QUEST");
|
||||
sb::Delegate::post("down");
|
||||
sb::Delegate::post("right");
|
||||
}
|
||||
else if (toggles++ < 2)
|
||||
{
|
||||
sb::Delegate::post("any");
|
||||
}
|
||||
else if (mock.cakefoot.configuration()("progress", "arcade level") <
|
||||
mock.cakefoot.configuration()("levels").size() - 2)
|
||||
{
|
||||
sb::Delegate::post("skip forward");
|
||||
if (toggles == 2)
|
||||
{
|
||||
sb::Delegate::post("up");
|
||||
sb::Delegate::post("any");
|
||||
}
|
||||
}
|
||||
else if (!mock.stat_progress.achievement_unlocked(mock.achievements["ACH_HOTCAKES"]))
|
||||
{
|
||||
sb::Delegate::post("any");
|
||||
mock.refresh_progress();
|
||||
if (mock.cakefoot.configuration()("progress", "arcade level") <
|
||||
mock.cakefoot.configuration()("levels").size() - 2)
|
||||
{
|
||||
if (level > 0)
|
||||
{
|
||||
CHECK(challenge_list.at(progress_challenge).at("name") == "RESUME ARCADE");
|
||||
CHECK(mock.cakefoot.configuration()("progress", "arcade level") == level);
|
||||
}
|
||||
sb::Delegate::post("skip forward");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb::Delegate::post("any");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user