Fix warning on nonexistent quest.lua text

Cavemen don't have goal_alt message - before lua, that one
fell through into goal_next message, but now it tried to
load the "common" message. Add ability to define message fallbacks,
and make goal_next the fallback for goal_alt.

Also prevent issuing quest.lua errors twice.
This commit is contained in:
Pasi Kallinen
2020-01-15 20:17:02 +02:00
parent 3f0b9f26c5
commit 2ba3fa9240
2 changed files with 41 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
-- - export the quest string replacements to lua, instead of %H etc
-- - allow checking if hero is carrying item (see comments for %Cp Arc 00042)
-- - fold quest_portal, quest_portal_again, quest_portal_demand into one
-- - some roles have no goal_alt, fold into goal_next?
-- - write tests to check questtext validity?
-- - qt_pager hack(?): if (qt_msg->delivery == 'p' && strcmp(windowprocs.name, "X11"))
@@ -25,6 +25,10 @@
questtext = {
-- If a role doesn't have a specific message, try a fallback
msg_fallbacks = {
goal_alt = "goal_next"
},
common = {
TEST_PATTERN = {
output = "text",