A few bug fixes. Part of major refactor.
This commit is contained in:
@@ -62,11 +62,11 @@ void attempt_daily_quest() {
|
||||
void check_quest_menu() {
|
||||
if (key_pressed(KEY_Q)) {
|
||||
if (x > BASE_END) {
|
||||
screen_reader_speak("You are not in the base.", true);
|
||||
speak_with_history("You are not in the base.", true);
|
||||
return;
|
||||
}
|
||||
if (quest_queue.length() == 0) {
|
||||
screen_reader_speak("No quests available.", true);
|
||||
speak_with_history("No quests available.", true);
|
||||
return;
|
||||
}
|
||||
run_quest_menu();
|
||||
@@ -75,7 +75,7 @@ void check_quest_menu() {
|
||||
|
||||
void apply_quest_reward(int score) {
|
||||
if (score <= 0) {
|
||||
screen_reader_speak("No reward earned.", true);
|
||||
speak_with_history("No reward earned.", true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ void apply_quest_reward(int score) {
|
||||
if (stones_gain > 0) message += " Stones +" + stones_added + ".";
|
||||
if (logs_gain > 0) message += " Logs +" + logs_added + ".";
|
||||
if (skins_gain > 0) message += " Skins +" + skins_added + ".";
|
||||
screen_reader_speak(message, true);
|
||||
speak_with_history(message, true);
|
||||
}
|
||||
|
||||
void run_quest(int quest_type) {
|
||||
screen_reader_speak(get_quest_description(quest_type), true);
|
||||
speak_with_history(get_quest_description(quest_type), true);
|
||||
wait(800);
|
||||
p.pause_all();
|
||||
int score = 0;
|
||||
@@ -113,7 +113,7 @@ void run_quest(int quest_type) {
|
||||
}
|
||||
|
||||
void run_quest_menu() {
|
||||
screen_reader_speak("Quest menu.", true);
|
||||
speak_with_history("Quest menu.", true);
|
||||
|
||||
int selection = 0;
|
||||
string[] options;
|
||||
@@ -125,20 +125,20 @@ void run_quest_menu() {
|
||||
wait(5);
|
||||
menu_background_tick();
|
||||
if (key_pressed(KEY_ESCAPE)) {
|
||||
screen_reader_speak("Closed.", true);
|
||||
speak_with_history("Closed.", true);
|
||||
break;
|
||||
}
|
||||
|
||||
if (key_pressed(KEY_DOWN)) {
|
||||
selection++;
|
||||
if (selection >= options.length()) selection = 0;
|
||||
screen_reader_speak(options[selection], true);
|
||||
speak_with_history(options[selection], true);
|
||||
}
|
||||
|
||||
if (key_pressed(KEY_UP)) {
|
||||
selection--;
|
||||
if (selection < 0) selection = options.length() - 1;
|
||||
screen_reader_speak(options[selection], true);
|
||||
speak_with_history(options[selection], true);
|
||||
}
|
||||
|
||||
if (key_pressed(KEY_RETURN)) {
|
||||
|
||||
Reference in New Issue
Block a user