mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- add some debugging information for GZSDF pagenames feature
This commit is contained in:
parent
a04d79d871
commit
a27990885e
2 changed files with 14 additions and 1 deletions
|
@ -566,7 +566,10 @@ public:
|
|||
if (nameToIndex.CheckKey(key))
|
||||
Printf("Warning! Duplicate page name '%s'!\n", Level->StrifeDialogues[i]->ThisNodeName.GetChars());
|
||||
else
|
||||
{
|
||||
nameToIndex[key] = i;
|
||||
DPrintf(DMSG_NOTIFY, "GZSDF linker: Assigning pagename '%s' to node %i\n", key, i);
|
||||
}
|
||||
usedstrings = true;
|
||||
}
|
||||
}
|
||||
|
@ -579,7 +582,10 @@ public:
|
|||
{
|
||||
itemLinkKey.ToLower();
|
||||
if (nameToIndex.CheckKey(itemLinkKey))
|
||||
{
|
||||
Level->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", Level->StrifeDialogues[i]->ItemCheckNodeName.GetChars(), i);
|
||||
}
|
||||
|
@ -592,7 +598,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);
|
||||
}
|
||||
|
|
|
@ -586,6 +586,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 < Level->StrifeDialogues.Size())
|
||||
{
|
||||
|
@ -606,7 +607,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue