Skip to content

Commit

Permalink
v1.6.0 (#99)
Browse files Browse the repository at this point in the history
* Close #95: Support disabling row highlights (#97)
* Close #16: loot history (#100)
* Close #103: Loot queue system
* Close #102: More reasonable max rows (#104)
  • Loading branch information
Mctalian committed Sep 9, 2024
1 parent 3af516e commit f1ef139
Show file tree
Hide file tree
Showing 31 changed files with 1,216 additions and 366 deletions.
1 change: 1 addition & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ externals:
Libs/AceHook-3.0: https://repos.wowace.com/wow/ace3/trunk/AceHook-3.0
Libs/AceTimer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
Libs/AceLocale-3.0: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0
Libs/AceBucket-3.0: https://repos.wowace.com/wow/ace3/trunk/AceBucket-3.0

enable-nolib-creation: yes

Expand Down
17 changes: 15 additions & 2 deletions .scripts/hardcode_string_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Function to check if a file or directory should be ignored
def should_ignore(path, ignore_files, ignore_dirs):
if os.path.basename(path) in ignore_dirs:
return True
for dir in ignore_dirs:
if path.startswith(f"./{dir}/"):
return True
Expand Down Expand Up @@ -65,8 +67,19 @@ def scan_directory(directory, ignore_files=None, ignore_dirs=None):


def main():
ignore_files = ["TestMode.lua"]
ignore_dirs = [".git", ".scripts", ".release", "locale"]
ignore_files = []
ignore_dirs = [
".git",
".github",
".release",
".scripts",
".trunk",
".venv",
"Icons",
"locale",
"luacov-html",
"spec",
]

# Scan the current directory
issues = scan_directory(".", ignore_files, ignore_dirs)
Expand Down
3 changes: 3 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ lint:
- linters: [stylua]
paths:
- locale/**
- linters: [no-invalid-prints]
paths:
- spec/**
enabled:
- stylua@0.20.0
- actionlint@1.7.1
Expand Down
60 changes: 44 additions & 16 deletions AddonScope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,52 @@ G_RLF = {}
local addonName = "RPGLootFeed"
local dbName = addonName .. "DB"
local localeName = addonName .. "Locale"

local xpcall = xpcall

local function errorhandler(err)
local suffix = "\n\n==== Addon Info " .. G_RLF.addonName .. " " .. G_RLF.addonVersion .. " ====\n\n"
suffix = suffix .. G_RLF.L["Issues"] .. "\n\n"

return geterrorhandler()(err .. suffix)
end

function G_RLF:fn(func, ...)
-- Borrowed from AceAddon-3.0
if type(func) == "function" then
return xpcall(func, errorhandler, ...)
end
end

G_RLF.RLF = LibStub("AceAddon-3.0"):NewAddon(addonName, "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0", "AceTimer-3.0")
G_RLF.RLF:SetDefaultModuleState(true)
G_RLF.RLF:SetDefaultModulePrototype({
getLogger = function(self)
return G_RLF.RLF:GetModule("Logger")
end,
fn = function(s, func, ...)
local function errorhandler(err)
local suffix = "\n\n==== Addon Info " .. G_RLF.addonName .. " " .. G_RLF.addonVersion .. " ====\n\n"
local status, trace = pcall(function()
return s:getLogger():Trace(s.moduleName)
end)
if status then
suffix = suffix .. "Log traces related to " .. s.moduleName .. "\n"
suffix = suffix .. "-------------------------------------------------\n"
suffix = suffix .. trace
suffix = suffix .. "-------------------------------------------------\n\n"
end
suffix = suffix .. G_RLF.L["Issues"] .. "\n\n"

return geterrorhandler()(err .. suffix)
end

-- Borrowed from AceAddon-3.0
if type(func) == "function" then
return xpcall(func, errorhandler, ...)
end
end,
})
G_RLF.addonName = addonName
G_RLF.dbName = dbName
G_RLF.localeName = localeName
Expand All @@ -20,19 +64,3 @@ G_RLF.DisableBossBanner = {
function G_RLF:Print(...)
G_RLF.RLF:Print(...)
end

local xpcall = xpcall

local function errorhandler(err)
local suffix = "\n\n==== Addon Info " .. G_RLF.addonName .. " " .. G_RLF.addonVersion .. " ====\n\n"
suffix = suffix .. G_RLF.L["Issues"] .. "\n\n"

return geterrorhandler()(err .. suffix)
end

function G_RLF:fn(func, ...)
-- Borrowed from AceAddon-3.0
if type(func) == "function" then
return xpcall(func, errorhandler, ...)
end
end
Loading

0 comments on commit f1ef139

Please sign in to comment.