fix: make learner-only mode static-free

This commit is contained in:
Xurkon
2026-06-05 21:26:27 -05:00
parent dbcf572e55
commit ec82d66a9e
2 changed files with 43 additions and 13 deletions
@@ -46,6 +46,15 @@ describe("QuestieLearner data source mode", function()
assert.is_true(has(priv, "local canUseLearnerSpawns = dataSourceMode == \"learner\""))
assert.is_true(has(priv, "or not staticHasSpawns"))
end)
it("keeps learner-only pin builders off the static DB lookup path", function()
local priv = read("Modules/Quest/QuestieQuestPrivates.lua")
assert.is_true(has(priv, "local strictLearnerOnly = dataSourceMode == \"learner\""))
assert.is_true(has(priv, "local name = strictLearnerOnly and nil or QuestieDB.QueryNPCSingle(npcId, \"name\")"))
assert.is_true(has(priv, "local spawns = strictLearnerOnly and {} or QuestieDB.QueryNPCSingle(npcId, \"spawns\")"))
assert.is_true(has(priv, "local name = strictLearnerOnly and nil or QuestieDB.QueryObjectSingle(objectId, \"name\")"))
assert.is_true(has(priv, "local spawns = strictLearnerOnly and {} or QuestieDB.QueryObjectSingle(objectId, \"spawns\")"))
end)
end)
describe("QuestieLearner missing base DB fallback", function()