Skip to content

Commit

Permalink
New "History" module, to show a list of seen things in the session
Browse files Browse the repository at this point in the history
  • Loading branch information
kemayo committed Jul 31, 2024
1 parent 7cc661d commit 2943031
Show file tree
Hide file tree
Showing 9 changed files with 436 additions and 14 deletions.
8 changes: 6 additions & 2 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ read_globals = {
"bit",
"math",
"ceil", "floor",
"abs", "mod", "max",
"abs", "mod", "max", "min",
"sin", "cos", "tan",
"hooksecurefunc",
"table", "tinsert", "tContains", "tAppendAll", "tDeleteItem", "wipe", "MergeTable",
"string", "tostringall", "strtrim", "strmatch", "strjoin", "strsplit", "strlower",
"time",
"time", "date",

-- our own globals

Expand Down Expand Up @@ -219,10 +219,12 @@ read_globals = {
"ChatFrame_OpenChat",
"CopyTable",
"CreateAtlasMarkup",
"CreateDataProvider",
"CreateTextureMarkup",
"CreateFrame",
"CreateFramePool",
"CreateObjectPool",
"CreateScrollBoxListLinearView",
"CreateFromMixins",
"CreateAndInitFromMixin",
"Mixin",
Expand Down Expand Up @@ -258,6 +260,8 @@ read_globals = {
"TooltipUtil",
"StaticPopup_FindVisible",
"StaticPopup_HideExclusive",
"ScrollUtil",
"GetRandomTableValue",

-- FrameXML Constants
"ACHIEVEMENTS",
Expand Down
1 change: 1 addition & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ externals:
move-folders:
SilverDragon/Overlay: SilverDragon_Overlay
SilverDragon/RangeExtender: SilverDragon_RangeExtender
SilverDragon/History: SilverDragon_History

ignore:
- tools
Expand Down
14 changes: 14 additions & 0 deletions History/SilverDragon_History.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Interface: 110000, 110002, 40400, 11502
## Title: SilverDragon: History
## Notes: Show the history of seen rares
## Version: @project-version@
## Author: Kemayo
## eMail: kemayo at gmail dot com
## IconTexture: Interface\Icons\INV_Misc_Head_Dragon_01
## X-Category: Interface Enhancements
## X-Donate: PayPal:kemayo AT gmail DOT com
## Dependencies: SilverDragon
## LoadManagers: AddonLoader
## X-LoadOn-Always: delayed

module.xml
39 changes: 39 additions & 0 deletions History/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
local myname = ...

local core = LibStub("AceAddon-3.0"):GetAddon("SilverDragon")
local module = core:GetModule("History")
local Debug = core.Debug
local ns = core.NAMESPACE

function module:RegisterConfig()
local config = core:GetModule("Config", true)
if not config then return end
config.options.plugins.history = { history = {
type = "group",
name = "History",
get = function(info) return self.db.profile[info[#info]] end,
set = function(info, v)
self.db.profile[info[#info]] = v
module:VIGNETTES_UPDATED()
end,
args = {
about = config.desc("Show a list of recently seen mobs, the easier to work out when future spawns will occur.", 0),
-- enabled = config.toggle("Enabled", "Extend the range at which minimap vignettes will appear.", 10),
enabled = {
type = "toggle",
name = "Enabled",
set = function(info, v)
self.db.profile[info[#info]] = v
if v then
self:Enable()
else
self:Disable()
end
end,
order = 10,
},
combat = config.toggle("Show in combat", "Whether to hide away when combat starts", 15),
loot = config.toggle("Include loot", "Whether to include treasure vignettes", 20),
},
}, }
end
Loading

0 comments on commit 2943031

Please sign in to comment.