fix: register direct tooltip fallback for special objectives

This commit is contained in:
Xurkon
2026-06-05 18:24:48 -05:00
parent cd01a537f3
commit 32b21de96a
2 changed files with 46 additions and 3 deletions
@@ -0,0 +1,21 @@
describe("QuestieQuest tooltip fallback", function()
local function read(path)
local f = assert(io.open(path, "r"), "cannot open " .. path)
local c = f:read("*a")
f:close()
return c
end
local function has(content, needle)
return string.find(content, needle, 1, true) ~= nil
end
it("registers direct objective tooltips when special objectives have ids but no spawnList", function()
local questieQuest = read("Modules/Quest/QuestieQuest.lua")
assert.is_true(has(questieQuest, 'tooltipKey = "m_" .. objective.Id'))
assert.is_true(has(questieQuest, 'tooltipKey = "o_" .. objective.Id'))
assert.is_true(has(questieQuest, 'tooltipKey = "i_" .. objective.Id'))
assert.is_true(has(questieQuest, "objective.registeredItemTooltips = true"))
end)
end)