Skip to content

Commit

Permalink
Merge pull request #71 from GurliGebis/fixes
Browse files Browse the repository at this point in the history
Misc fixes
  • Loading branch information
GurliGebis authored Sep 11, 2024
2 parents b252aa8 + c1ebcd8 commit 66a6578
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 11.0.2-20240911-1

* Change options to store bool values as strings.
* Update the quest log tooltip to have WQ related info.

## 11.0.2-20240910-2

* Added workarounds for World Map taints.
Expand Down
18 changes: 15 additions & 3 deletions Modules/Config/ConfigModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ do
local filterTable

function ConfigModule:Get(key)
return DBModule:GetValue(key)
local value = DBModule:GetValue(key)

if value == "true" then
return true
elseif value == "false" then
return false
else
return value
end
end

function ConfigModule:Set(key, newValue, silent)
Expand Down Expand Up @@ -254,10 +262,14 @@ do
local key = self.configKey

if panelOriginalConfig[key] == nil then
panelOriginalConfig[key] = ConfigModule.Get(key)
panelOriginalConfig[key] = ConfigModule:Get(key)
end

ConfigModule:Set(key, self:GetChecked())
if self:GetChecked() then
ConfigModule:Set(key, "true")
else
ConfigModule:Set(key, "false")
end
end

local function DropDown_OnClick(self, dropdown)
Expand Down
40 changes: 27 additions & 13 deletions Modules/DB/DBModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ local DBModule = AngrierWorldQuests:NewModule("DBModule")

local defaultOptions = {
profile = {
collapsed = false,
showAtTop = true,
showHoveredPOI = false,
onlyCurrentZone = true,
collapsed = "false",
showAtTop = "true",
showHoveredPOI = "false",
onlyCurrentZone = "true",
selectedFilters = 0,
disabledFilters = 3725425,
__filters = 24,
Expand All @@ -45,18 +45,18 @@ local defaultOptions = {
filterFaction = 0,
filterZone = 0,
filterTime = 0,
lootFilterUpgrades = false,
lootFilterUpgrades = "false",
lootUpgradesLevel = -1,
timeFilterDuration = 6,
hideUntrackedPOI = false,
hideFilteredPOI = true,
hideQuestList = false,
showContinentPOI = true,
enableDebugging = false,
enableTaintWorkarounds = false,
hideUntrackedPOI = "false",
hideFilteredPOI = "true",
hideQuestList = "false",
showContinentPOI = "true",
enableDebugging = "false",
enableTaintWorkarounds = "false",
sortMethod = 2,
extendedInfo = false,
saveFilters = false
extendedInfo = "false",
saveFilters = "false"
}
}

Expand Down Expand Up @@ -113,13 +113,27 @@ do
return GetDataVersion(profile)
end

local function MigrateTrueFalseToStrings(profile)
for k, v in pairs(defaultOptions.profile) do
if DBModule:GetValue(k) == true then
DBModule:SetValue(k, "true")
end
end

profile.dataVersion = 2
return GetDataVersion(profile)
end

function DBModule:MigrateProfile()
local profile = self:GetProfile()
local version = GetDataVersion(profile)

if version < 1 then
version = MigrateOldSettings(profile)
end
if version < 2 then
version = MigrateTrueFalseToStrings(profile)
end
end
end
--endregion
1 change: 1 addition & 0 deletions Modules/QuestFrame/QuestFrameModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ do
return
end

button.questRewardTooltipStyle = TOOLTIP_QUEST_REWARDS_STYLE_WORLD_QUEST
button.OnLegendPinMouseEnter = function() end
button.OnLegendPinMouseLeave = function() end

Expand Down

0 comments on commit 66a6578

Please sign in to comment.