diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 96b00b1a5..0d7d311b4 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -207,7 +207,10 @@ void P_LoadStrifeConversations (MapData *map, const char *mapname) if (!LoadScriptFile(scriptname_t, false, 2)) { - LoadScriptFile (scriptname_b, false, 1); + if (!LoadScriptFile (scriptname_b, false, 1)) + { + LoadScriptFile ("SCRIPT00", false, 1); + } } } } @@ -813,6 +816,18 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang toSay = "Go away!"; // Ok, it's lame - but it doesn't look like an error to the player. ;) } } + else + { + // handle string table replacement + if (toSay[0] == '$') + { + toSay = GStrings(toSay + 1); + } + } + if (toSay == NULL) + { + toSay = "."; + } DialogueLines = V_BreakLines (SmallFont, screen->GetWidth()/CleanXfac - 24*2, toSay); // Fill out the possible choices @@ -830,6 +845,12 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang for (j = 0; reply->ReplyLines[j].Width >= 0; ++j) { item.label = reply->ReplyLines[j].Text.LockBuffer(); + // handle string table replacement + if (item.label[0] == '$') + { + item.label = GStrings(item.label + 1); + } + item.b.position = j == 0 ? i : 0; item.c.extra = reply; ConversationItems.Push (item); @@ -1207,13 +1228,19 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply } else { - replyText = "You seem to have enough!"; + replyText = "$txt_haveenough"; } // Update the quest log, if needed. if (reply->LogString != NULL) { - player->SetLogText(reply->LogString); + const char *log = reply->LogString; + if (log[0] == '$') + { + log = GStrings(log + 1); + } + + player->SetLogText(log); } else if (reply->LogNumber != 0) { @@ -1366,6 +1393,12 @@ static void TerminalResponse (const char *str) { if (str != NULL) { + // handle string table replacement + if (str[0] == '$') + { + str = GStrings(str + 1); + } + if (StatusBar != NULL) { AddToConsole(-1, str); diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 5f05ba447..883b0e325 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1476,6 +1476,7 @@ TXT_RANDOM_PGUARD_10 = "If there is any honor inside that pathetic shell of a bo TXT_RANDOMGOODBYE_1 = "Bye!"; TXT_RANDOMGOODBYE_2 = "Thanks, bye!"; TXT_RANDOMGOODBYE_3 = "See you later!"; +TXT_HAVEENOUGH = "You seem to have enough!"; // Skills: