This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,44 @@
function update(data)
if data.quests then
for questName, quest in pairs(data.quests) do
-- remove unused and deprecated entries
quest.planet = nil
quest.triggerPrefix = nil
quest.triggersReceived = nil
-- update conditions
for i, condition in ipairs(quest.conditions) do
if condition.kind == "gather" then
condition.count = condition.item.count
condition.item = condition.item.name
elseif condition.kind == "gatherTrigger" then
condition.kind = "gather"
condition.tag, condition.trigger = condition.trigger, nil
elseif condition.kind == "trigger" then
if condition.trigger == "ai.repairthrusters" then
condition.kind = "shiplevel"
condition.level = 2
elseif condition.trigger == "ai.repairftl" then
condition.kind = "shiplevel"
condition.level = 3
else
sb.logInfo("Unknown quest trigger '%s'", condition.trigger)
end
else
sb.logInfo("Unknown quest condition kind '%s'", condition.kind)
end
condition.type, condition.kind = condition.kind, nil
end
quest.completionConditions, quest.conditions = quest.conditions, nil
-- check for weirdness
if quest.status == "pending" then
quest.status = "active"
sb.logInfo("Quest '%s' has unknown status Pending; setting to Active")
end
end
end
return data
end