Compare commits
No commits in common. "37edad7920c706994b5d4eb55fd1702fa40e99a1" and "829d901a89e28bb039a38adfaf9ac4b87c670206" have entirely different histories.
37edad7920
...
829d901a89
|
@ -1,6 +1,3 @@
|
|||
-- TODO: Hide ignored quests on compass
|
||||
-- TODO: Fix gamepad support
|
||||
|
||||
-- TODO: Use localisation files
|
||||
ZO_CreateStringId("SI_AO_IGNORED_QUEST_CATEGORY", "Ignored")
|
||||
ZO_CreateStringId("SI_AO_IGNORE_QUEST_TOOLTIP", "Ignore")
|
||||
|
@ -52,40 +49,19 @@ end
|
|||
--
|
||||
|
||||
function AO_ToggleIgnoreQuest(questIndex)
|
||||
-- TODO: Make it impossible to ignore all quests (but what when you complete the last unignored quest?)
|
||||
|
||||
local quests, categories, seenCategories = QUEST_JOURNAL_MANAGER:GetQuestListData()
|
||||
|
||||
local quest = AO_GetQuestByIndex(questIndex)
|
||||
|
||||
if AO_IsQuestIgnored(quest) then
|
||||
AO_IGNORED_QUESTS[quest.name] = nil
|
||||
|
||||
WORLD_MAP_QUEST_BREADCRUMBS:OnQuestAdded(questIndex)
|
||||
|
||||
PlaySound(SOUNDS.QUEST_SHARE_ACCEPTED)
|
||||
|
||||
if FOCUSED_QUEST_TRACKER:GetNumTracked() == 0 then
|
||||
FOCUSED_QUEST_TRACKER:ForceAssist(questIndex)
|
||||
end
|
||||
else
|
||||
AO_IGNORED_QUESTS[quest.name] = true
|
||||
|
||||
AO_ORIG_QUEST_CATEGORY_NAMES[quest.name] = quest.categoryName
|
||||
AO_ORIG_QUEST_CATEGORY_TYPES[quest.name] = quest.categoryType
|
||||
|
||||
WORLD_MAP_QUEST_BREADCRUMBS:OnQuestRemoved(false, questIndex)
|
||||
|
||||
PlaySound(SOUNDS.QUEST_SHARE_DECLINED)
|
||||
|
||||
local lastTracked = FOCUSED_QUEST_TRACKER:GetLastTracked()
|
||||
if lastTracked.trackType == TRACK_TYPE_QUEST and lastTracked.arg1 == questIndex then
|
||||
local unignoredQuest = AO_GetFirstUnignoredQuest()
|
||||
|
||||
if unignoredQuest then
|
||||
FOCUSED_QUEST_TRACKER:ForceAssist(unignoredQuest.questIndex)
|
||||
else
|
||||
FOCUSED_QUEST_TRACKER:ClearTracker()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
SYSTEMS:GetObject("questJournal"):OnQuestsUpdated()
|
||||
|
@ -102,25 +78,9 @@ function AO_GetQuestByIndex(questIndex)
|
|||
end
|
||||
|
||||
function AO_IsQuestIgnored(quest)
|
||||
if not quest then
|
||||
return nil
|
||||
end
|
||||
|
||||
return AO_IGNORED_QUESTS[quest.name]
|
||||
end
|
||||
|
||||
function AO_GetFirstUnignoredQuest()
|
||||
local quests, categories, seenCategories = QUEST_JOURNAL_MANAGER:GetQuestListData()
|
||||
|
||||
for _, quest in ipairs(quests) do
|
||||
if quest and not AO_IsQuestIgnored(quest) then
|
||||
return quest
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function AO_SortQuestCategories(entry1, entry2)
|
||||
if entry1.type == entry2.type then
|
||||
return entry1.name < entry2.name
|
||||
|
@ -188,31 +148,9 @@ FOCUSED_QUEST_TRACKER.BeginTracking = function(self, trackType, arg1, arg2)
|
|||
local questIndex = arg1
|
||||
|
||||
if AO_IsQuestIgnored(AO_GetQuestByIndex(questIndex)) then
|
||||
local unignoredQuest = AO_GetFirstUnignoredQuest()
|
||||
|
||||
if unignoredQuest then
|
||||
FOCUSED_QUEST_TRACKER:ForceAssist(unignoredQuest.questIndex)
|
||||
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
return __FOCUSED_QUEST_TRACKER_BeginTracking(self, trackType, arg1, arg2)
|
||||
end
|
||||
|
||||
---
|
||||
--- WORLD_MAP_QUEST_BREADCRUMBS.RefreshQuest
|
||||
---
|
||||
|
||||
__WORLD_MAP_QUEST_BREADCRUMBS_RefreshQuest = WORLD_MAP_QUEST_BREADCRUMBS.RefreshQuest
|
||||
|
||||
WORLD_MAP_QUEST_BREADCRUMBS.RefreshQuest = function(self, questIndex)
|
||||
__WORLD_MAP_QUEST_BREADCRUMBS_RefreshQuest(self, questIndex)
|
||||
|
||||
if AO_IsQuestIgnored(AO_GetQuestByIndex(questIndex)) then
|
||||
WORLD_MAP_QUEST_BREADCRUMBS:OnQuestRemoved(false, questIndex)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Title: CleanJournal
|
||||
## License: NCSA
|
||||
## Author: Les De Ridder <eso@lesderid.net>
|
||||
## Author: Les De Ridder <les@lesderid.net>
|
||||
## AddOnVersion: 1
|
||||
## APIVersion: 100025
|
||||
## DependsOn:
|
||||
|
|
Loading…
Reference in New Issue