diff --git a/.luacheckrc b/.luacheckrc
index 42227e8..fff24c4 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -1,4 +1,4 @@
-globals = {'LibStub', 'BUTTON_LAG_AUCTIONHOUSE', 'LANDING_PAGE_REPORT', 'COPPER_PER_SILVER', 'SILVER_PER_GOLD', 'GOLD_AMOUNT_TEXTURE_STRING', 'SILVER_AMOUNT_TEXTURE', 'LE_ITEM_CLASS_RECIPE', 'LE_ITEM_RECIPE_BOOK'}
+globals = {'LibStub', 'RECrystallize_PriceCheck', 'BUTTON_LAG_AUCTIONHOUSE', 'LANDING_PAGE_REPORT', 'COPPER_PER_SILVER', 'SILVER_PER_GOLD', 'GOLD_AMOUNT_TEXTURE_STRING', 'SILVER_AMOUNT_TEXTURE', 'LE_ITEM_CLASS_RECIPE', 'LE_ITEM_RECIPE_BOOK'}
ignore = {'self'}
max_line_length = false
self = false
diff --git a/.pkgmeta b/.pkgmeta
index 6bf44f0..d4f2bc5 100644
--- a/.pkgmeta
+++ b/.pkgmeta
@@ -4,6 +4,8 @@ externals:
Libs/LibStub: https://repos.wowace.com/wow/ace3/trunk/LibStub
Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/ace3/trunk/CallbackHandler-1.0
Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
+ Libs/AceConfigDialog-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0/AceConfigDialog-3.0
+ Libs/AceConfigRegistry-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0/AceConfigRegistry-3.0
Libs/AceLocale-3.0: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0
ignore:
diff --git a/Embeds.xml b/Embeds.xml
index 478a2d0..bf56d9c 100644
--- a/Embeds.xml
+++ b/Embeds.xml
@@ -3,6 +3,8 @@
+
+
diff --git a/Locale/enUS.lua b/Locale/enUS.lua
index 0fb37a4..efe9bdd 100644
--- a/Locale/enUS.lua
+++ b/Locale/enUS.lua
@@ -8,3 +8,11 @@ L["Scan time"] = true
L["New items"] = true
L["Updated items"] = true
L["Removed items"] = true
+L["Always display the price of the entire stock"] = true
+L["When enabled the functionality of the SHIFT button will be swapped."] = true
+L["Data freshness"] = true
+L["The number of days after which old data will be deleted."] = true
+L["Scanning speed"] = true
+L["Setting this value lower might speed up the scanning process but also can cause disconnects."] = true
+L["Purge this server database"] = true
+L["WARNING! This operation is not reversible!"] = true
\ No newline at end of file
diff --git a/RECrystallize.lua b/RECrystallize.lua
index 891af22..d94f6f5 100644
--- a/RECrystallize.lua
+++ b/RECrystallize.lua
@@ -42,6 +42,53 @@ RE.TooltipIcon = ""
RE.TooltipItemID = 0
RE.TooltipCount = 0
RE.TooltipCustomCount = -1
+RE.AceConfig = {
+ type = "group",
+ args = {
+ minimap = {
+ name = L["Always display the price of the entire stock"],
+ desc = L["When enabled the functionality of the SHIFT button will be swapped."],
+ type = "toggle",
+ width = "full",
+ order = 1,
+ set = function(_, val) RE.Config.AlwaysShowAll = val end,
+ get = function(_) return RE.Config.AlwaysShowAll end
+ },
+ dbcleanup = {
+ name = L["Data freshness"],
+ desc = L["The number of days after which old data will be deleted."],
+ type = "range",
+ width = "double",
+ order = 2,
+ min = 1,
+ max = 14,
+ step = 1,
+ set = function(_, val) RE.Config.DatabaseCleanup = val * 86400 end,
+ get = function(_) return RE.Config.DatabaseCleanup / 86400 end
+ },
+ scanpulse = {
+ name = L["Scanning speed"],
+ desc = L["Setting this value lower might speed up the scanning process but also can cause disconnects."],
+ type = "range",
+ width = "double",
+ order = 3,
+ min = 0.1,
+ max = 2,
+ step = 0.1,
+ set = function(_, val) RE.Config.ScanPulse = val end,
+ get = function(_) return RE.Config.ScanPulse end
+ },
+ dbpurge = {
+ name = L["Purge this server database"],
+ desc = L["WARNING! This operation is not reversible!"],
+ type = "execute",
+ width = "double",
+ order = 4,
+ confirm = true,
+ func = function() RE.DB[RE.RealmString] = {}; collectgarbage("collect") end
+ },
+ }
+}
local function ElvUISwag(sender)
if sender == "Livarax-BurningLegion" then
@@ -186,6 +233,8 @@ function RE:OnEvent(self, event, ...)
if RE.DB[RE.RealmString] == nil then
RE.DB[RE.RealmString] = {}
end
+ _G.LibStub("AceConfigRegistry-3.0"):RegisterOptionsTable("RECrystallize", RE.AceConfig)
+ _G.LibStub("AceConfigDialog-3.0"):AddToBlizOptions("RECrystallize", "RECrystallize")
if RE.Config.GuildChatPC then
self:RegisterEvent("CHAT_MSG_GUILD")
@@ -336,10 +385,10 @@ function RE:EndScan()
RE.AHButton:SetText(L["Scan finished!"])
PlaySound(_G.SOUNDKIT.AUCTION_WINDOW_CLOSE)
print("|cFF9D9D9D---|r |cFF74D06CRE|rCrystallize "..LANDING_PAGE_REPORT.." |cFF9D9D9D---|r")
- print(L["Scan time"]..": "..SecondsToTime(time() - RE.Config.LastScan))
- print(L["New items"]..": "..RE.ScanStats[1])
- print(L["Updated items"]..": "..RE.ScanStats[2])
- print(L["Removed items"]..": "..RE.ScanStats[3])
+ print("|cFF74D06C"..L["Scan time"]..":|r "..SecondsToTime(time() - RE.Config.LastScan))
+ print("|cFF74D06C"..L["New items"]..":|r "..RE.ScanStats[1])
+ print("|cFF74D06C"..L["Updated items"]..":|r "..RE.ScanStats[2])
+ print("|cFF74D06C"..L["Removed items"]..":|r "..RE.ScanStats[3])
end
function RE:ParseDatabase()
diff --git a/RECrystallize.toc b/RECrystallize.toc
index bccd07f..fe60cba 100644
--- a/RECrystallize.toc
+++ b/RECrystallize.toc
@@ -1,7 +1,7 @@
## Interface: 80300
## Title: |cFF74D06CRE|rCrystallize
## Notes: Provide Auction House scanner and add item prices to tooltips.
-## Version: 1.4.2
+## Version: 1.5.0
## Author: AcidWeb
## SavedVariables: RECrystallizeSettings, RECrystallizeDatabase
## X-Website: https://www.curseforge.com/wow/addons/recrystallize-auction-house-scanner