Skip to content

Commit

Permalink
Added option to disable key notification
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jan 17, 2024
1 parent 26dc800 commit 442651f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Locale/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ L["Respond to !keys queries on the guild chat"] = true
L["Respond to !keys queries on the group/raid chat"] = true
L["Display minimap button"] = true
L["Pinned characters"] = true
L["Comma-separated list of character names. They will be shown at the top of the list regardless of status."] = true
L["Comma-separated list of character names. They will be shown at the top of the list regardless of status."] = true
L["Send new key notification"] = true
L["When checked notification to party will be send when the new key is acquired."] = true
17 changes: 13 additions & 4 deletions REKeys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RE.GroupFound = false
RE.TooltipDirty = false
RE.RewardsDirty = false

RE.DefaultSettings = {["CurrentWeek"] = 0, ["ResetTimestamp"] = 0, ["ServerTimestamp"] = 0, ["PinnedCharacters"] = {}, ["Sorting"] = 1, ["FullDungeonName"] = false, ["ChatQueryGuild"] = true, ["ChatQueryGroup"] = true, ["OfflinePlayers"] = false, ["MinimapButtonSettings"] = {["hide"] = false}}
RE.DefaultSettings = {["CurrentWeek"] = 0, ["ResetTimestamp"] = 0, ["ServerTimestamp"] = 0, ["PinnedCharacters"] = {}, ["Sorting"] = 1, ["FullDungeonName"] = false, ["ChatQueryGuild"] = true, ["ChatQueryGroup"] = true, ["OfflinePlayers"] = false, ["KeyNotification"] = true, ["MinimapButtonSettings"] = {["hide"] = false}}
RE.AceConfig = {
type = "group",
args = {
Expand Down Expand Up @@ -93,11 +93,20 @@ RE.AceConfig = {
set = function(_, val) RE.Settings.FullDungeonName = val end,
get = function(_) return RE.Settings.FullDungeonName end
},
keynotification = {
name = L["Send new key notification"],
desc = L["When checked notification to party will be send when the new key is acquired."],
type = "toggle",
width = "full",
order = 6,
set = function(_, val) RE.Settings.KeyNotification = val end,
get = function(_) return RE.Settings.KeyNotification end
},
sorting = {
name = _G.BAG_FILTER_TITLE_SORTING,
type = "select",
width = "double",
order = 6,
order = 7,
values = {
[1] = _G.CALENDAR_EVENT_NAME,
[2] = _G.RATING,
Expand All @@ -111,7 +120,7 @@ RE.AceConfig = {
desc = L["Comma-separated list of character names. They will be shown at the top of the list regardless of status."],
type = "input",
width = "double",
order = 7,
order = 8,
set = function(_, val)
RE.Settings.PinnedCharacters = {}
local input = {strsplit(",", val)}
Expand Down Expand Up @@ -379,7 +388,7 @@ function RE:FindKey(dungeonCompleted)
elseif keystone ~= RE.Keystone.MapID or keystoneLevel ~= RE.Keystone.Level then
RE.Keystone.MapID = keystone
RE.Keystone.Level = keystoneLevel
if dungeonCompleted and IsInGroup() and not IsInRaid() then
if RE.Settings.KeyNotification and dungeonCompleted and IsInGroup() and not IsInRaid() then
SendChatMessage("[REKeys] "..L["My new key"]..": "..RE:GetKeystoneLink(), "PARTY")
end
RE.LDB.text = "|cffe6cc80"..RE:GetShortMapName(RE.Keystone.MapID).." +"..RE.Keystone.Level.."|r"
Expand Down

0 comments on commit 442651f

Please sign in to comment.