core: move expansion checks into module header

This commit is contained in:
shagu
2021-10-10 12:14:46 +02:00
parent 81efaea6a9
commit ebe5d91a3a
27 changed files with 52 additions and 52 deletions
+10 -9
View File
@@ -1,3 +1,13 @@
local _G = _G or getfenv(0)
local GetExpansion = ShaguTweaks.GetExpansion
local module = ShaguTweaks:register({
title = "Vendor Values",
description = "Shows the vendor sell values on all item tooltips.",
expansions = { ["vanilla"] = true, ["tbc"] = true },
enabled = true,
})
local data = {
[25]=7, [35]=9, [36]=7, [37]=7, [38]=1, [39]=1,
[40]=1, [43]=1, [44]=1, [45]=1, [47]=1, [48]=1,
@@ -3735,15 +3745,6 @@ local data_tbc = {
[38506]=25500, [38518]=37, [38576]=0, [38626]=2, [38628]=100000
}
local module = ShaguTweaks:register({
title = "Vendor Values",
description = "Shows the vendor sell values on all item tooltips.",
enabled = true,
})
local _G = _G or getfenv(0)
local GetExpansion = ShaguTweaks.GetExpansion
if GetExpansion() == "tbc" then
for k,v in pairs(data_tbc) do data[k] = v end
end