- add some debugging information for GZSDF pagenames feature

# Conflicts:
#	src/p_usdf.cpp
This commit is contained in:
Rachael Alexanderson 2019-05-22 11:50:53 -04:00 committed by drfrag
parent d1298e2a71
commit d54c1a7af1
2 changed files with 14 additions and 1 deletions

View file

@ -1129,6 +1129,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
{
int rootnode = npc->ConversationRoot;
const unsigned next = (unsigned)(rootnode + reply->NextNode - 1);
FString nextname = reply->NextNodeName;
if (next < StrifeDialogues.Size())
{
@ -1149,7 +1150,10 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
}
else
{
Printf ("Next node %u is invalid, no such dialog page\n", next);
if (nextname.IsEmpty())
Printf ("Next node %u is invalid, no such dialog page\n", next);
else
Printf ("Next node %u ('%s') is invalid, no such dialog page\n", next, nextname);
}
}

View file

@ -564,7 +564,10 @@ public:
if (nameToIndex.CheckKey(key))
Printf("Warning! Duplicate page name '%s'!\n", StrifeDialogues[i]->ThisNodeName.GetChars());
else
{
nameToIndex[key] = i;
DPrintf(DMSG_NOTIFY, "GZSDF linker: Assigning pagename '%s' to node %i\n", key, i);
}
usedstrings = true;
}
}
@ -577,7 +580,10 @@ public:
{
itemLinkKey.ToLower();
if (nameToIndex.CheckKey(itemLinkKey))
{
StrifeDialogues[i]->ItemCheckNode = nameToIndex[itemLinkKey] + 1;
DPrintf(DMSG_NOTIFY, "GZSDF linker: Item Link '%s' in node %i was index %i\n", itemLinkKey, i, nameToIndex[itemLinkKey]);
}
else
Printf("Warning! Reference to non-existent item-linked dialogue page name '%s' in page %i!\n", StrifeDialogues[i]->ItemCheckNodeName.GetChars(), i);
}
@ -590,7 +596,10 @@ public:
FString key = NodeCheck->NextNodeName;
key.ToLower();
if (nameToIndex.CheckKey(key))
{
NodeCheck->NextNode = nameToIndex[key] + 1;
DPrintf(DMSG_NOTIFY, "GZSDF linker: Nextpage Link '%s' in node %i was index %i\n", key, i, nameToIndex[key]);
}
else
Printf("Warning! Reference to non-existent reply-linked dialogue page name '%s' in page %i!\n", NodeCheck->NextNodeName.GetChars(), i);
}