Update special node and talking node strings/data for the new quest stuff

- Also, Update Quest node now uses the mess1/2 fields.
This commit is contained in:
2015-02-01 13:24:32 -05:00
parent a41468eea8
commit 4f93e8ea5a
9 changed files with 80 additions and 34 deletions

View File

@@ -2439,6 +2439,7 @@ void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
*next_spec = -1;
break;
case eSpecType::UPDATE_QUEST:
check_mess = true;
if(spec.ex1a < 0 || spec.ex1a >= univ.scenario.quests.size()) {
giveError("The scenario tried to update a non-existent quest.");
break;

View File

@@ -391,21 +391,23 @@ std::istream& operator >> (std::istream& in, eSpecType& e) {
// e - Choose button to select a status effect
// E - Choose button to select a party status effect
// w - Choose button to select main party status effect
// j - Choose button to select a quest
// J - Choose button to select a quest status
// 0..9 - Choose button to select a specific type of picture
// (terrain, monster, dialog, talk, item, pc, field, boom, missile, status)
static const char*const button_dict[7][11] = {
{ // general nodes
" mmmMmmmmmMmmm mmmmmm Mmm $ mmmmmm ", // msg1
" ", // msg2
" ", // msg3
" p 3", // pic
" ? ", // pictype
" # x T i M cit ", // ex1a
" & S ss c", // ex1b
" ", // ex1c
" tt ", // ex2a
" % t ", // ex2b
" ", // ex2c
" mmmMmmmmmMmmm mmmmmm Mmm $ mmmmmm m", // msg1
" ", // msg2
" ", // msg3
" p 3 ", // pic
" ? ", // pictype
" # x T i M cit j", // ex1a
" & S ss cJ", // ex1b
" ", // ex1c
" tt ", // ex2a
" % t ", // ex2b
" ", // ex2c
}, { // one-shot nodes
"mm md d mmm", // msg1
" ", // msg2
@@ -431,17 +433,17 @@ static const char*const button_dict[7][11] = {
" D ", // ex2b
" x ", // ex2c
}, { // if-then nodes
" f $ $ ", // msg1
" s ", // msg2
" ", // msg3
" ", // pic
" ", // pictype
" T I w APae Qq $ * ", // ex1a
"ssss sss ssssss s s sssss = ", // ex1b
" s ssss", // ex1c
" t K$ ", // ex2a
"s ss s + s==+s = ", // ex2b
" = s ", // ex2c
" f $ $ ", // msg1
" s ", // msg2
" ", // msg3
" ", // pic
" ", // pictype
" T I w APae Qq $ * j", // ex1a
"ssss sss ssssss s s sssss = J", // ex1b
" s sssss", // ex1c
" t K$ ", // ex2a
"s ss s + s==+s = ", // ex2b
" = s ", // ex2c
}, { // town nodes
"mmmmmmmmmmmmmmm dddmmmmmmmmmmmm", // msg1
" ", // msg2

View File

@@ -198,6 +198,11 @@ short choose_text(eStrType list, unsigned short cur_choice, cDialog* parent, con
strings.push_back(item.name);
}
break;
case STRT_QUEST:
for(cQuest& quest : scenario.quests) {
strings.push_back(quest.name);
}
break;
case STRT_TER:
for(cTerrain& ter : scenario.ter_types) {
strings.push_back(ter.name);
@@ -319,6 +324,9 @@ short choose_text(eStrType list, unsigned short cur_choice, cDialog* parent, con
case STRT_DIR:
strings = {"North", "Northease", "East", "Southeast", "South", "Southwest", "West", "Northwest", "None"};
break;
case STRT_QUEST_STATUS:
strings = {"Available", "Started", "Completed", "Failed"};
break;
}
if(cur_choice < 0 || cur_choice >= strings.size())
cur_choice = -1;
@@ -800,6 +808,8 @@ static bool edit_spec_enc_value(cDialog& me, std::string item_hit, node_stack_t&
case '*': strt = STRT_CONTEXT; title = "What context?"; break;
case ':': strt = STRT_STAIR_MODE; title = "Select trigger limitations:"; break;
case 'w': strt = STRT_STATUS; title = "Select status:"; str_adj = 1; break;
case 'j': strt = STRT_QUEST; title = "Select a quest:"; break;
case 'J': strt = STRT_QUEST_STATUS; title = "Select the quest's status:"; break;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
choose_string = false;

View File

@@ -11,7 +11,7 @@ enum eStrType {
STRT_ATTITUDE, STRT_STAIR, STRT_LIGHT, STRT_CONTEXT,
STRT_SHOP, STRT_COST_ADJ, STRT_STAIR_MODE, STRT_TALK_NODE,
STRT_STATUS, STRT_SPELL_PAT, STRT_SUMMON, STRT_TALK,
STRT_ENCHANT, STRT_DIR,
STRT_ENCHANT, STRT_DIR, STRT_QUEST, STRT_QUEST_STATUS,
};
bool cre(short val,short min,short max,std::string text1,std::string text2,cDialog* parent) ;