From ec5f6816adda957d264fc169562cfc5ede8166d7 Mon Sep 17 00:00:00 2001 From: Limmek Date: Thu, 8 Aug 2024 00:22:45 +0200 Subject: [PATCH] Changes needed to not violate CurseForge ToS #16 --- .vscode/settings.json | 11 +- Images/icon.png | Bin 7608 -> 17085 bytes Locales/enUS.lua | 21 +- Locales/zhCN.lua | 2 +- PersonalPlayerNotes.lua | 397 +++++++++++++++++--------------- PersonalPlayerNotes.toc | 6 +- PersonalPlayerNotesConfig.lua | 204 ++++++++-------- PersonalPlayerNotesUtils.lua | 42 ++-- PersonalPlayerNotes_Cata.toc | 4 +- PersonalPlayerNotes_Vanilla.toc | 4 +- PersonalPlayerNotes_Wrath.toc | 4 +- README.md | 33 +-- 12 files changed, 374 insertions(+), 354 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c9a8012..2928959 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -122,7 +122,14 @@ "ipairs", "UnitFullName", "PlaySoundFile", - "Menu" + "Menu", + "WOW_PROJECT_ID", + "WOW_PROJECT_MAINLINE", + "StaticPopupDialogs", + "StaticPopup_Show", + "C_UI", + "CreateColor", + "next" ], "Lua.runtime.builtin": { "basic": "disable", @@ -136,6 +143,6 @@ "utf8": "disable" }, "Lua.workspace.library": [ - "/home/codespace/.vscode-remote/extensions/ketho.wow-api-0.15.5/Annotations" + "c:\\Users\\jim_a\\.vscode\\extensions\\ketho.wow-api-0.15.5\\Annotations" ], } \ No newline at end of file diff --git a/Images/icon.png b/Images/icon.png index 159ae5c60a34bb8c4421847fe602c99b02c47b0c..d045836afd9ea394645641220695d1224a51eed3 100644 GIT binary patch literal 17085 zcmd74cT`hR_bqxtktR(Mlok~c5CIhsqy+>)K#Cx}DhdeFq)APbW&@;&ARVMPrPoAI zvCyQ0h9XEWp$8I@yN};@fA8Nr-WczV>liV~$v$Vdwbz_$uDy9?sISG!%*zZx5Ucie z4I>Dm0Uv1~#zWw3>(RhIcw_RsZs835^Fajw_MjedHZ_1t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x4om)%shgW zw%Hi?+e!B6mAa9;t!CJubGI<`1$Jj`Z^j~KXryT9G>t3fL>xz%S1by{n78AkviP3$ zR?Jl6EHk5Ld8Wb|A4{;b<`Zh}TlKm!UcHS&a-Qn_qE=}YukCnC`TF7$Wwoo{ibMxw znekK+3;w6#Q(++CSI%E*jwbWTa_L)}+0~eMh>L2fvBx*f3RBLdvpXW{ZQpzkjed59lF^8uUYC9Jc#-dg zF5W*b!}S$(;uB;Trg2|hu7p8-S5*_xW7qpxn792}itavr?%Ixd$5r;M71Q}vdI@(W z!HK|sx2#+ps^dQLb%$rn$=%Fu^Ho{TXd{R4zWQu`s~w>|=1!|gOmp_YUdOed%flyD zhMq@8>WwQcR0@ZN-|r{SWett#Ld;T@VnjlosBEy(n??dr<5g=XcgoldgsW^bk9)zx z`aMBx&8e<;O?;|WzeuxBi(^f(dsJB9;q7pBi~N(1?`ksQbKaMUbcJ_!XyU&ZI|a2W z&T?tJY>sphONyI+@W8i5q29@@;>|b)0os7um(_md9rOcn?4@P--mP5^uU`J1X`A4# z<6>Jm)q9@U6!7f1jPmb0PJ|R$;4cVwI)`Udc1z`{Nk_766P2GIsuNNw$?mZ^Mirqg zFyccy_KzNaXe)E{MNiP8g%orV|46=n{44M*i-xvsuupiVGt$i}Tr diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 6b91657..38a8576 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -1,4 +1,4 @@ -local L = LibStub("AceLocale-3.0"):NewLocale("Shitlist", "enUS", true) +local L = LibStub("AceLocale-3.0"):NewLocale("PersonalPlayerNotes", "enUS", true) -- White |cffffffff -- Red |cffff0000 @@ -9,15 +9,15 @@ local L = LibStub("AceLocale-3.0"):NewLocale("Shitlist", "enUS", true) -- GOLDENROD |cFFDAA520 -- TAN |cFFD2B48C -L["SHITLIST"] = "Shitlist"; -L["SHITLIST_DEBUG"] = "|cffff0000[Shitlist]|cffffffff"; -L["SHITLIST_PRINT"] = "|cffffd700[Shitlist]|cffffffff"; +L["SHITLIST"] = "Personal Player Notes"; +L["SHITLIST_DEBUG"] = "|cffff0000[Personal Player Notes]|cffffffff"; +L["SHITLIST_PRINT"] = "|cffffd700[Personal Player Notes]|cffffffff"; L["SHITLIST_NA"] = "N/A"; L["SHITLIST_DISABLE"] = "Unloading..."; -L["SHITLIST_MENU_TITLE"] = "Shitlist"; +L["SHITLIST_MENU_TITLE"] = "Personal Player Notes"; L["SHITLIST_MENU_SETTINGS"] = "Options"; L["SHITLIST_MENU_REASONS"] = "Reasons"; L["SHITLIST_MENU_LISTED_PLAYERS"] = "Listed Players"; @@ -30,6 +30,7 @@ L["SHITLIST_CONFIG_REASONS"] = "Reasons:"; L["SHITLIST_CONFIG_LISTEDPLAYERS"] = "Players:"; L["SHITLIST_CONFIG_REFRESH"] = "Reloading configuration..."; L["SHITLIST_CONFIG_CHECK_OLD_DATA"] = "Checking for old player data..."; +L["SHITLIST_CONFIG_MIGRATE_OLD_DATA"] = "Migrating profiles from Shitlist."; L["SHITLIST_CONFIG_ADDED_OLD_DATA"] = "Added old player:"; L["SHITLIST_CONFIG_DUPLICATE_DATA"] = "Found duplicate:"; @@ -49,7 +50,7 @@ L["SHITLIST_INFO_ABOUT_LICENSE"] = "License"; L["SHITLIST_INFO_ABOUT_WEB"] = "Website"; L["SHITLIST_SETTINGS"] = "Options"; -L["SHITLIST_SETTINGS_TITLE"] = "Shitlist - Options"; +L["SHITLIST_SETTINGS_TITLE"] = "Personal Player Notes - Options"; L["SHITLIST_SETTINGS_MINIMAP"] = "Minimap"; L["SHITLIST_SETTINGS_MINIMAP_ICON"] = "Hide the icon."; L["SHITLIST_SETTINGS_MINIMAP_ICON_DESC"] = "Show or hide the minimap icon."; @@ -65,7 +66,7 @@ L["SHITLIST_SETTINGS_ALERT_SOUNDS_DESC"] = "Select the sound to be played."; L["SHITLIST_SETTINGS_ALERT_DELAY"] = "Delay"; L["SHITLIST_SETTINGS_ALERT_DELAY_DESC"] = "How many seconds to sleep before a new alert for the same player is played."; -L["SHITLIST_REASONS_TITLE"] = "Shitlist - Reasons"; +L["SHITLIST_REASONS_TITLE"] = "Personal Player Notes - Reasons"; L["SHITLIST_REASONS"] = "Reasons"; L["SHITLIST_REASON"] = "Reason"; L["SHITLIST_REASON_DESCRIPTION"] = "Here you can Edit, Add or Remove differrent reasons.\n"; @@ -75,7 +76,7 @@ L["SHITLIST_REASON_COLOR"] = "Select a color"; L["SHITLIST_REASON_ALERT_ENABLED"] = "Alert" L["SHITLIST_REASON_ALERT_ENABLED_DESC"] = "Toggle sound effect for all players with this reason." -L["SHITLIST_LISTED_PLAYERS_TITLE"] = "Shitlist - Listed Players"; +L["SHITLIST_LISTED_PLAYERS_TITLE"] = "Personal Player Notes - Listed Players"; L["SHITLIST_LISTED_PLAYERS"] = "Listed Players"; L["SHITLIST_LISTED_PLAYER"] = "Listed Player"; L["SHITLIST_LISTED_PLAYER_REMOVE"] = "Remove Player"; @@ -89,11 +90,11 @@ L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED"] = "Alert" L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED_DESC"] = "Toggle sound effect for a specific player. If a sound effect is disabled on a pre defined reason then this has no effect." -L["SHITLIST_POPUP_ADD"] = "Add to Shitlist"; +L["SHITLIST_POPUP_ADD"] = "Add Player"; L["SHITLIST_POPUP_EDIT"] = "Edit Player"; L["SHITLIST_POPUP_NEW_ADDED"] = "Added"; -L["SHITLIST_MINIMAP_TOOLTIP_TITLE"] = "Shitlist" +L["SHITLIST_MINIMAP_TOOLTIP_TITLE"] = "Personal Player Notes" L["SHITLIST_MINIMAP_TOOLTIP_RIGHT_CLICK"] = "|cFFD2B48C Right-Click|cff00ff00 to open Blizzard options." L["SHITLIST_MINIMAP_TOOLTIP_LEFT_CLICK"] = "|cFFD2B48C Left-Click|cff00ff00 to open options." L["SHITLIST_MINIMAP_TOOLTIP_SHIFT_LEFT_CLICK"] = "|cFFD2B48C SHIFT + Left-Click|cff00ff00 to open reasons." diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index 65b0692..8637176 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -1,4 +1,4 @@ -local L = LibStub("AceLocale-3.0"):NewLocale("Shitlist", "zhCN") +local L = LibStub("AceLocale-3.0"):NewLocale("PersonalPlayerNotes", "zhCN") if not L then return end -- White |cffffffff diff --git a/PersonalPlayerNotes.lua b/PersonalPlayerNotes.lua index 655f846..9f64183 100644 --- a/PersonalPlayerNotes.lua +++ b/PersonalPlayerNotes.lua @@ -1,46 +1,51 @@ -local shitlist = ... -Shitlist = LibStub("AceAddon-3.0"):NewAddon(shitlist, "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0", +local personalPlayerNotes = ... +PersonalPlayerNotes = LibStub("AceAddon-3.0"):NewAddon(personalPlayerNotes, "AceConsole-3.0", "AceEvent-3.0", + "AceHook-3.0", "AceTimer-3.0" , "AceSerializer-3.0") -local L = LibStub("AceLocale-3.0"):GetLocale(shitlist, true) -local AceConfig = LibStub("AceConfig-3.0") -local AceConfigDialog = LibStub("AceConfigDialog-3.0") -local AceConfigRegistry = LibStub("AceConfigRegistry-3.0") -local LibDataBroker = LibStub("LibDataBroker-1.1") -local LibDBIcon = LibStub("LibDBIcon-1.0") +local L = LibStub("AceLocale-3.0"):GetLocale(personalPlayerNotes, true) +local AceConfig = LibStub("AceConfig-3.0") +local AceConfigDialog = LibStub("AceConfigDialog-3.0") +local AceConfigRegistry = LibStub("AceConfigRegistry-3.0") +local LibDataBroker = LibStub("LibDataBroker-1.1") +local LibDBIcon = LibStub("LibDBIcon-1.0") -local IS_RETAIL = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or nil; -Shitlist.IsRetail = IS_RETAIL; +local IS_RETAIL = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or false; +PersonalPlayerNotes.IsRetail = IS_RETAIL; -function Shitlist:OnInitialize() +function PersonalPlayerNotes:OnInitialize() -- uses the "Default" profile instead of character-specific profiles -- https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0 - self.db = LibStub("AceDB-3.0"):New("ShitlistDB", self.defaults, true) - self.db.RegisterCallback(self, "OnNewProfile", "RefreshConfig") - self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig") - self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig") - self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig") + self.db = LibStub("AceDB-3.0"):New("PersonalPlayerNotesDB", self.defaults, true) + self.db.RegisterCallback(self, "OnNewProfile", "LoadConfig") + self.db.RegisterCallback(self, "OnProfileChanged", "LoadConfig") + self.db.RegisterCallback(self, "OnProfileCopied", "LoadConfig") + self.db.RegisterCallback(self, "OnProfileReset", "LoadConfig") -- registers an options table and adds it to the Blizzard options window -- https://www.wowace.com/projects/ace3/pages/api/ace-config-3-0 - AceConfig:RegisterOptionsTable("ShitlistSettings Info", self.options.Info) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Info", shitlist) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Info", self.options.Info) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Info", personalPlayerNotes) - AceConfig:RegisterOptionsTable("ShitlistSettings Options", self.options.Settings, { "slo" }) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Options", L["SHITLIST_MENU_SETTINGS"], shitlist) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Options", self.options.Settings, { "slo" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Options", L["SHITLIST_MENU_SETTINGS"], + personalPlayerNotes) - AceConfig:RegisterOptionsTable("ShitlistSettings Reasons", self.options.Reasons, { "slr" }) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Reasons", L["SHITLIST_MENU_REASONS"], shitlist) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Reasons", self.options.Reasons, { "slr" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Reasons", L["SHITLIST_MENU_REASONS"], + personalPlayerNotes) - AceConfig:RegisterOptionsTable("ShitlistSettings Listed_Players", self.options.ListedPlayers, { "slp" }) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Listed_Players", L["SHITLIST_MENU_LISTED_PLAYERS"], shitlist) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Listed_Players", self.options.ListedPlayers, { "slp" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Listed_Players", L["SHITLIST_MENU_LISTED_PLAYERS"], + personalPlayerNotes) -- adds a child options table, in this case our profiles panel local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db) - AceConfig:RegisterOptionsTable("ShitlistSettings Profiles", profiles) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Profiles", L["SHITLIST_MENU_PROFILES"], shitlist) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Profiles", profiles) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Profiles", L["SHITLIST_MENU_PROFILES"], + personalPlayerNotes) - LibDBIcon:Register(shitlist, self:MiniMapIcon(), self.db.profile.minimap) + LibDBIcon:Register(personalPlayerNotes, self:MiniMapIcon(), self.db.profile.minimap) -- https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0 self:RegisterChatCommand("slm", "ToggleMiniMapIcon") @@ -49,11 +54,16 @@ function Shitlist:OnInitialize() self:RegisterChatCommand("sldebug", "ToggleDebug") --@end-debug@ - self:GetOldConfigData() - self:RefreshConfig() + local loaded, reason = LoadAddOn("Shitlist") + if not loaded then + self:Print("Failed to load Shitlist because", reason) + else + self:GetOldConfigData() + end + self:LoadConfig() end -function Shitlist:OnEnable() +function PersonalPlayerNotes:OnEnable() self:Print(L["SHITLIST_CONFIG_LOADING"]) self:Print(L["SHITLIST_CONFIG_VERSION"], _G["ORANGE_FONT_COLOR_CODE"], self:GetVersion()) self:Print(L["SHITLIST_CONFIG_REASONS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetReasons()) @@ -76,17 +86,17 @@ function Shitlist:OnEnable() self:Print(L["SHITLIST_CONFIG_LOADED"]) end -function Shitlist:OnDisable() +function PersonalPlayerNotes:OnDisable() self:Print(L["SHITLIST_DISABLE"]) end -function Shitlist:RefreshConfig() +function PersonalPlayerNotes:LoadConfig() self.db.profile.alert.last = {} if self.db.profile.minimap.hide then - LibDBIcon:Hide(shitlist) + LibDBIcon:Hide(personalPlayerNotes) else - LibDBIcon:Show(shitlist) + LibDBIcon:Show(personalPlayerNotes) end --@debug@ @@ -96,78 +106,100 @@ function Shitlist:RefreshConfig() --@end-debug@ end -function Shitlist:GetOldConfigData() - -- Check if old data exist pre addon 2.0.0 version - if _G.ShitlistDB.ListedPlayers == nil and _G.ShitlistDB.Reasons == nil then - return - end - self:Print(L["SHITLIST_CONFIG_CHECK_OLD_DATA"]) - - local oldReasons = _G.ShitlistDB.Reasons - local oldListedPlayers = _G.ShitlistDB.ListedPlayers +function PersonalPlayerNotes:GetOldConfigData() local reasons = self:GetReasons() local listedPlayers = self:GetListedPlayers() - local newPlayers = {} + -- Check if old data exist pre addon 2.0.0 version + if ShitlistDB.Reasons ~= nil and ShitlistDB.ListedPlayers ~= nil then + self:Print(L["SHITLIST_CONFIG_CHECK_OLD_DATA"]) - -- Check old listed player list - if oldListedPlayers ~= nil then - for _, player in pairs(listedPlayers) do - newPlayers[player.name .. "-" .. player.realm] = true - end + local oldListedPlayers = ShitlistDB.ListedPlayers + local newPlayers = {} - for key, value in pairs(oldListedPlayers) do - local name, realm = key:match("([^-]+)-([^-]+)") - if name and realm then - if not newPlayers[name .. "-" .. realm] then - local reason = value[1] - local description = value[2] - - -- Check if the reason exist already and get it's id. - local reasonId = nil - for _, r in ipairs(reasons) do - if r.reason == reason then - reasonId = r.id - break + -- Check old listed player list + if oldListedPlayers ~= nil then + for _, player in pairs(listedPlayers) do + newPlayers[player.name .. "-" .. player.realm] = true + end + + for key, value in pairs(oldListedPlayers) do + local name, realm = key:match("([^-]+)-([^-]+)") + if name and realm then + if not newPlayers[name .. "-" .. realm] then + local reason = value[1] + local description = value[2] + + -- Check if the reason exist already and get it's id. + local reasonId = nil + for _, r in ipairs(reasons) do + if r.reason == reason then + reasonId = r.id + break + end end - end - -- If the reason do not exist add it to the reason data. - if not reasonId then - reasonId = #reasons + 1 - reasons[reasonId] = { - id = reasonId, - reason = reason, + -- If the reason do not exist add it to the reason data. + if not reasonId then + reasonId = #reasons + 1 + reasons[reasonId] = { + id = reasonId, + reason = reason, + color = { r = 1, g = 1, b = 1 }, + alert = true, + } + end + + -- Add the old player to the new listed players + listedPlayers[#listedPlayers + 1] = { + id = #listedPlayers + 1, + name = name, + realm = realm, + reason = reasonId, + description = description, color = { r = 1, g = 1, b = 1 }, alert = true, } - end - -- Add the old player to the new listed players - listedPlayers[#listedPlayers + 1] = { - id = #listedPlayers + 1, - name = name, - realm = realm, - reason = reasonId, - description = description, - color = { r = 1, g = 1, b = 1 }, - alert = true, - } - - self:Print(L["SHITLIST_CONFIG_ADDED_OLD_DATA"], name .. "-" .. realm) - else - self:Print(L["SHITLIST_CONFIG_DUPLICATE_DATA"], name .. "-" .. realm) + self:Print(L["SHITLIST_CONFIG_ADDED_OLD_DATA"], name .. "-" .. realm) + else + self:Print(L["SHITLIST_CONFIG_DUPLICATE_DATA"], name .. "-" .. realm) + end end end - end - -- remove the old listed players from the database - _G.ShitlistDB.ListedPlayers = nil - _G.ShitlistDB.Reasons = nil + -- remove the old listed players from the database + ShitlistDB.ListedPlayers = nil + ShitlistDB.Reasons = nil + end end - -- TODO: Add support to use the new PersonalPlayerNotesDB and move old data to the new DB. + -- Move old shitlist profiles data to new Personal Player Notes database + if ShitlistDB and ShitlistDB.profiles then + StaticPopupDialogs["MIGRATE_PROFILES"] = { + text = "Do you want to migrate profiles from Shitlist?", + button1 = "Yes", + button2 = "No", + OnAccept = function() + PersonalPlayerNotes:Print(L["SHITLIST_CONFIG_MIGRATE_OLD_DATA"]) + for profileName, profileData in pairs(ShitlistDB.profiles) do + PersonalPlayerNotes.db.profiles[profileName] = profileData + end + self:Print(L["SHITLIST_CONFIG_REASONS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetReasons()) + self:Print(L["SHITLIST_CONFIG_LISTEDPLAYERS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetListedPlayers()) + PersonalPlayerNotes:Print("Profiles from Shitlist has been migrated.") + self.db:SetProfile("Default") + DisableAddOn("Shitlist") + C_UI.Reload() + end, + timeout = 0, + whileDead = true, + hideOnEscape = true, + preferredIndex = 3, + } + StaticPopup_Show("MIGRATE_PROFILES") + end end -function Shitlist:DropDownMenuInitialize() +function PersonalPlayerNotes:DropDownMenuInitialize() local DropDownMenu = function(ownerRegion, rootDescription, contextData) -- verify the unit if contextData.unit == nil or not UnitIsPlayer(contextData.unit) then @@ -178,44 +210,46 @@ function Shitlist:DropDownMenuInitialize() -- if the unit is from the same realm then realm is empty, use current realm instead if realm == nil then realm = GetRealmName() end - local listedPlayer = Shitlist:GetListedPlayer(name, realm) + local listedPlayer = PersonalPlayerNotes:GetListedPlayer(name, realm) if (not listedPlayer) then + rootDescription:CreateDivider() + rootDescription:CreateTitle(L["SHITLIST"]) rootDescription:CreateButton(L["SHITLIST_POPUP_ADD"], function() - Shitlist:Print(L["SHITLIST_POPUP_NEW_ADDED"], name, realm) + PersonalPlayerNotes:Print(L["SHITLIST_POPUP_NEW_ADDED"], name, realm) - local new_player = Shitlist:NewListedPlayer(name, realm) - Shitlist.db.profile.listedPlayer.id = new_player.id - Shitlist.db.profile.listedPlayer.name = new_player.name - Shitlist.db.profile.listedPlayer.realm = new_player.realm - Shitlist.db.profile.listedPlayer.reason = new_player.reason - Shitlist.db.profile.listedPlayer.description = new_player.description - Shitlist.db.profile.listedPlayer.color = new_player.color - Shitlist.db.profile.listedPlayer.alert = new_player.alert + local new_player = PersonalPlayerNotes:NewListedPlayer(name, realm) + PersonalPlayerNotes.db.profile.listedPlayer.id = new_player.id + PersonalPlayerNotes.db.profile.listedPlayer.name = new_player.name + PersonalPlayerNotes.db.profile.listedPlayer.realm = new_player.realm + PersonalPlayerNotes.db.profile.listedPlayer.reason = new_player.reason + PersonalPlayerNotes.db.profile.listedPlayer.description = new_player.description + PersonalPlayerNotes.db.profile.listedPlayer.color = new_player.color + PersonalPlayerNotes.db.profile.listedPlayer.alert = new_player.alert AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end) else - local submenu = rootDescription:CreateButton(shitlist); - submenu:CreateTitle(shitlist) - submenu:CreateDivider() - submenu:CreateButton(L["SHITLIST_POPUP_EDIT"], function() - Shitlist.db.profile.listedPlayer.id = listedPlayer.id - Shitlist.db.profile.listedPlayer.name = listedPlayer.name - Shitlist.db.profile.listedPlayer.realm = listedPlayer.realm - Shitlist.db.profile.listedPlayer.reason = listedPlayer.reason - Shitlist.db.profile.listedPlayer.description = listedPlayer.description - Shitlist.db.profile.listedPlayer.color = listedPlayer.color - Shitlist.db.profile.listedPlayer.alert = listedPlayer.alert + rootDescription:CreateDivider() + rootDescription:CreateTitle(L["SHITLIST"]) + --local submenu = rootDescription:CreateButton(L["SHITLIST"]); + rootDescription:CreateButton(L["SHITLIST_POPUP_EDIT"], function() + PersonalPlayerNotes.db.profile.listedPlayer.id = listedPlayer.id + PersonalPlayerNotes.db.profile.listedPlayer.name = listedPlayer.name + PersonalPlayerNotes.db.profile.listedPlayer.realm = listedPlayer.realm + PersonalPlayerNotes.db.profile.listedPlayer.reason = listedPlayer.reason + PersonalPlayerNotes.db.profile.listedPlayer.description = listedPlayer.description + PersonalPlayerNotes.db.profile.listedPlayer.color = listedPlayer.color + PersonalPlayerNotes.db.profile.listedPlayer.alert = listedPlayer.alert AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end) end end @@ -225,9 +259,9 @@ function Shitlist:DropDownMenuInitialize() end -- Classic Deprecated -function Shitlist:UnitPopup_ShowMenu(target, unit, menuList) +function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) --@debug@ - Shitlist:PrintDebug("Unit: ", unit, ", Target: ", target) + PersonalPlayerNotes:PrintDebug("Unit: ", unit, ", Target: ", target) --@end-debug@ -- verify the target @@ -242,17 +276,17 @@ function Shitlist:UnitPopup_ShowMenu(target, unit, menuList) local name, realm = UnitName(unit) -- if the unit is from the same realm then realm is empty, use current realm instead if realm == nil then realm = GetRealmName() end - local listedPlayer = Shitlist:GetListedPlayer(name, realm) + local listedPlayer = PersonalPlayerNotes:GetListedPlayer(name, realm) --@debug@ - Shitlist:PrintDebug("Name: ", name, ", Realm: ", realm) + PersonalPlayerNotes:PrintDebug("Name: ", name, ", Realm: ", realm) --@end-debug@ -- Check if this is the root level of the dropdown menu if UIDROPDOWNMENU_MENU_LEVEL == 1 then if (listedPlayer) then UIDropDownMenu_AddButton({ - text = shitlist, + text = personalPlayerNotes, notCheckable = true, hasArrow = true, keepShownOnClick = true, @@ -261,37 +295,37 @@ function Shitlist:UnitPopup_ShowMenu(target, unit, menuList) UIDropDownMenu_AddButton({ text = L["SHITLIST_POPUP_ADD"], notCheckable = true, - icon = Shitlist.db.profile.icon, + icon = PersonalPlayerNotes.db.profile.icon, value = { name, realm }, func = function() - Shitlist:Print(L["SHITLIST_POPUP_NEW_ADDED"], name, realm) - local new_player = Shitlist:NewListedPlayer(name, realm) - Shitlist.db.profile.listedPlayer.id = new_player.id - Shitlist.db.profile.listedPlayer.name = new_player.name - Shitlist.db.profile.listedPlayer.realm = new_player.realm - Shitlist.db.profile.listedPlayer.reason = new_player.reason - Shitlist.db.profile.listedPlayer.description = new_player.description - Shitlist.db.profile.listedPlayer.color = new_player.color - Shitlist.db.profile.listedPlayer.alert = new_player.alert + PersonalPlayerNotes:Print(L["SHITLIST_POPUP_NEW_ADDED"], name, realm) + local new_player = PersonalPlayerNotes:NewListedPlayer(name, realm) + PersonalPlayerNotes.db.profile.listedPlayer.id = new_player.id + PersonalPlayerNotes.db.profile.listedPlayer.name = new_player.name + PersonalPlayerNotes.db.profile.listedPlayer.realm = new_player.realm + PersonalPlayerNotes.db.profile.listedPlayer.reason = new_player.reason + PersonalPlayerNotes.db.profile.listedPlayer.description = new_player.description + PersonalPlayerNotes.db.profile.listedPlayer.color = new_player.color + PersonalPlayerNotes.db.profile.listedPlayer.alert = new_player.alert AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end, }, UIDROPDOWNMENU_MENU_LEVEL) end - elseif UIDROPDOWNMENU_MENU_VALUE == shitlist then + elseif UIDROPDOWNMENU_MENU_VALUE == personalPlayerNotes then -- Add the submenu local menuItem = UIDropDownMenu_CreateInfo() - menuItem.text = shitlist + menuItem.text = personalPlayerNotes menuItem.notCheckable = true menuItem.keepShownOnClick = true menuItem.hasArrow = false menuItem.isTitle = true menuItem.disabled = true - menuItem.icon = Shitlist.db.profile.icon + menuItem.icon = PersonalPlayerNotes.db.profile.icon UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) menuItem = UIDropDownMenu_CreateInfo() @@ -301,27 +335,26 @@ function Shitlist:UnitPopup_ShowMenu(target, unit, menuList) menuItem.value = listedPlayer menuItem.func = function() if (listedPlayer) then - Shitlist.db.profile.listedPlayer.id = listedPlayer.id - Shitlist.db.profile.listedPlayer.name = listedPlayer.name - Shitlist.db.profile.listedPlayer.realm = listedPlayer.realm - Shitlist.db.profile.listedPlayer.reason = listedPlayer.reason - Shitlist.db.profile.listedPlayer.description = listedPlayer.description - Shitlist.db.profile.listedPlayer.color = listedPlayer.color - Shitlist.db.profile.listedPlayer.alert = listedPlayer.alert + PersonalPlayerNotes.db.profile.listedPlayer.id = listedPlayer.id + PersonalPlayerNotes.db.profile.listedPlayer.name = listedPlayer.name + PersonalPlayerNotes.db.profile.listedPlayer.realm = listedPlayer.realm + PersonalPlayerNotes.db.profile.listedPlayer.reason = listedPlayer.reason + PersonalPlayerNotes.db.profile.listedPlayer.description = listedPlayer.description + PersonalPlayerNotes.db.profile.listedPlayer.color = listedPlayer.color + PersonalPlayerNotes.db.profile.listedPlayer.alert = listedPlayer.alert AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end end UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) - end end -function Shitlist:GameTooltip() +function PersonalPlayerNotes:GameTooltip() local _name, unit = self:GetUnit() if not (unit and UnitIsPlayer(unit)) then return end @@ -330,15 +363,16 @@ function Shitlist:GameTooltip() if (realm == nil) then realm = GetRealmName() end - local listedPlayer = Shitlist:GetListedPlayer(name, realm) + local listedPlayer = PersonalPlayerNotes:GetListedPlayer(name, realm) if (not listedPlayer) then return end - local reason = Shitlist:GetReasons()[listedPlayer.reason] + local reason = PersonalPlayerNotes:GetReasons()[listedPlayer.reason] local _reason = reason local _listedPlayer = listedPlayer --@debug@ - Shitlist:PrintDebug("|cffff0000|cffffffff Playername:", name, "Realm:", realm, "Reason:", _reason + PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Playername:", name, "Realm:", realm, "Reason:", + _reason .reason, "Note:", _listedPlayer.description) --@end-debug@ @@ -346,7 +380,7 @@ function Shitlist:GameTooltip() -- Tooltip if not (_reason.reason == "None" and _listedPlayer.description == "") then self:AddLine("\n") - self:AddDoubleLine(_reason.reason:gsub("None", ""), "|T" .. Shitlist.db.profile.icon .. ":0|t", + self:AddDoubleLine(_reason.reason:gsub("None", ""), "|T" .. PersonalPlayerNotes.db.profile.icon .. ":0|t", _reason.color.r or 1, _reason.color.g or 1, _reason.color.b or 1) self:AddLine(_listedPlayer.description, _listedPlayer.color.r or 1, _listedPlayer.color.g or 1, _listedPlayer.color.b or 1, false) @@ -354,60 +388,62 @@ function Shitlist:GameTooltip() -- Alert local time = time() - local alert = Shitlist.db.profile.alert + local alert = PersonalPlayerNotes.db.profile.alert if (alert.enabled and reason.alert) then if (listedPlayer.alert and not alert.last[name]) then alert.last[name] = time + alert.delay - Shitlist:ScheduleTimer("AlertDelayTimer", alert.delay, name) - Shitlist:PlayAlertSoundEffect() + PersonalPlayerNotes:ScheduleTimer("AlertDelayTimer", alert.delay, name) + PersonalPlayerNotes:PlayAlertSoundEffect() --@debug@ - Shitlist:PrintDebug("|cffff0000|cffffffff Sound effect disabled for player", name, "for", alert.delay, + PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Sound effect disabled for player", name, "for", + alert.delay, "seconds.") --@end-debug@ end end end -function Shitlist:AlertDelayTimer(name) +function PersonalPlayerNotes:AlertDelayTimer(name) -- Called within ScheduleTimer and fires when timer ends. --@debug@ - Shitlist:PrintDebug("|cffff0000|cffffffff Sound effect is now enabled for player", name) + PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Sound effect is now enabled for player", name) --@end-debug@ - Shitlist.db.profile.alert.last[name] = nil + PersonalPlayerNotes.db.profile.alert.last[name] = nil end -function Shitlist:MiniMapIcon() +function PersonalPlayerNotes:MiniMapIcon() -- Create minimap launcher -- https://github.com/tekkub/libdatabroker-1-1/wiki/How-to-provide-a-dataobject - return LibDataBroker:NewDataObject(shitlist, { + return LibDataBroker:NewDataObject(personalPlayerNotes, { type = "launcher", - text = shitlist, - icon = Shitlist.db.profile.icon, + text = personalPlayerNotes, + icon = PersonalPlayerNotes.db.profile.icon, OnClick = function(clickedframe, button) - AceConfigDialog:Close("ShitlistSettings Options") + AceConfigDialog:Close("PersonalPlayerNotesSettings Options") AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() if button == "RightButton" then - InterfaceOptionsFrame_OpenToCategory(shitlist) + InterfaceOptionsFrame_OpenToCategory(personalPlayerNotes) elseif button == "LeftButton" then if IsShiftKeyDown() then AceGUI:SetTitle(L["SHITLIST_REASONS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Reasons", 500, 200) - AceConfigDialog:Open("ShitlistSettings Reasons") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Reasons", 500, 200) + AceConfigDialog:Open("PersonalPlayerNotesSettings Reasons") elseif IsControlKeyDown() then AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") else AceGUI:SetTitle(L["SHITLIST_SETTINGS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Options", 500, 350) - AceConfigDialog:Open("ShitlistSettings Options") + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Options", 500, 350) + AceConfigDialog:Open("PersonalPlayerNotesSettings Options") end end end, OnTooltipShow = function(tooltip) - tooltip:AddDoubleLine("|T" .. Shitlist.db.profile.icon .. ":0|t " .. L["SHITLIST_MINIMAP_TOOLTIP_TITLE"], - Shitlist:GetVersion()) + tooltip:AddDoubleLine( + "|T" .. PersonalPlayerNotes.db.profile.icon .. ":0|t " .. L["SHITLIST_MINIMAP_TOOLTIP_TITLE"], + PersonalPlayerNotes:GetVersion()) tooltip:AddLine("\n") tooltip:AddLine(L["SHITLIST_MINIMAP_TOOLTIP_RIGHT_CLICK"]) tooltip:AddLine(L["SHITLIST_MINIMAP_TOOLTIP_LEFT_CLICK"]) @@ -417,14 +453,15 @@ function Shitlist:MiniMapIcon() }) end -function Shitlist:ToggleMiniMapIcon() +function PersonalPlayerNotes:ToggleMiniMapIcon() self.db.profile.minimap.hide = not self.db.profile.minimap.hide - self:RefreshConfig() + self:LoadConfig() end --@debug@ -function Shitlist:ToggleDebug() +function PersonalPlayerNotes:ToggleDebug() self.db.profile.debug = not self.db.profile.debug - self:RefreshConfig() + self:LoadConfig() end + --@end-debug@ diff --git a/PersonalPlayerNotes.toc b/PersonalPlayerNotes.toc index f191d25..634a7b0 100644 --- a/PersonalPlayerNotes.toc +++ b/PersonalPlayerNotes.toc @@ -1,10 +1,10 @@ ## Interface: 110002 ## Title : Personal Player Notes -## Notes: Set a personal comment on players and show it on the player information tooltip window. +## Notes: Set a personal comment on players and adding it to player information tooltip. ## Author: Limmek ## Version: @project-version@ ## Dependencies: -## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 +## OptionalDeps: Shitlist, Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 ## SavedVariables: PersonalPlayerNotesDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames @@ -12,7 +12,7 @@ ## X-Localizations: enUS, zhCN ## X-Website: https://github.com/Limmek/Shitlist ## X-License: MIT -## IconTexture: Interface\AddOns\Shitlist\Images\icon.png +## IconTexture: Interface\AddOns\PersonalPlayerNotes\Images\icon.png embeds.xml diff --git a/PersonalPlayerNotesConfig.lua b/PersonalPlayerNotesConfig.lua index 31d9738..0ebbde3 100644 --- a/PersonalPlayerNotesConfig.lua +++ b/PersonalPlayerNotesConfig.lua @@ -1,9 +1,9 @@ -local shitlist = ... -local L = LibStub("AceLocale-3.0"):GetLocale(shitlist, true) +local personalPlayerNotes = ... +local L = LibStub("AceLocale-3.0"):GetLocale(personalPlayerNotes, true) -Shitlist.defaults = { +PersonalPlayerNotes.defaults = { profile = { - icon = "Interface\\AddOns\\" .. shitlist .. "\\Images\\shitlist.png", + icon = "Interface\\AddOns\\" .. personalPlayerNotes .. "\\Images\\icon.png", debug = false, minimap = { hide = false, minimapPos = 240 }, announcement = { delay = 10, guild = true, party = true, raid = true, instance = true }, @@ -46,7 +46,7 @@ Shitlist.defaults = { } -- https://www.wowace.com/projects/ace3/pages/ace-config-3-0-options-tables -Shitlist.options = { +PersonalPlayerNotes.options = { Info = { type = "group", order = 0, @@ -58,7 +58,7 @@ Shitlist.options = { order = 1, type = "description", fontSize = "medium", - name = Shitlist:GetNotes() .. "\n\n\n", + name = PersonalPlayerNotes:GetNotes() .. "\n\n\n", }, Commands = { name = L["SHITLIST_INFO_COMMANDS_TITLE"], @@ -105,7 +105,7 @@ Shitlist.options = { width = "full", fontSize = "medium", name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_VERSION"] .. - ": |cffff8c00" .. Shitlist:GetVersion() + ": |cffff8c00" .. PersonalPlayerNotes:GetVersion() }, author = { type = "description", @@ -113,7 +113,7 @@ Shitlist.options = { width = "full", fontSize = "medium", name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_AUTHOR"] .. - ": |cffffffff" .. Shitlist:GetAuthor() + ": |cffffffff" .. PersonalPlayerNotes:GetAuthor() }, category = { type = "description", @@ -121,7 +121,7 @@ Shitlist.options = { width = "full", fontSize = "medium", name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_CATEGORY"] .. - ": |cffffffff" .. Shitlist:GetCategory() + ": |cffffffff" .. PersonalPlayerNotes:GetCategory() }, localizations = { type = "description", @@ -129,7 +129,7 @@ Shitlist.options = { width = "full", fontSize = "medium", name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_LOCALIZATION"] .. - ": |cffffffff" .. Shitlist:GetLocalizations() + ": |cffffffff" .. PersonalPlayerNotes:GetLocalizations() }, license = { type = "description", @@ -137,7 +137,7 @@ Shitlist.options = { width = "full", fontSize = "medium", name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_LICENSE"] .. - ": |cffffffff" .. Shitlist:GetLicense() + ": |cffffffff" .. PersonalPlayerNotes:GetLicense() }, website = { type = "description", @@ -145,7 +145,7 @@ Shitlist.options = { width = "full", fontSize = "medium", name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_WEB"] .. - ": |cffffffff" .. Shitlist:GetWebsite() + ": |cffffffff" .. PersonalPlayerNotes:GetWebsite() }, } } @@ -157,7 +157,7 @@ Shitlist.options = { name = L["SHITLIST_SETTINGS_TITLE"], inline = true, childGroups = "tab", - handler = Shitlist, + handler = PersonalPlayerNotes, args = { minimap = { name = L["SHITLIST_SETTINGS_MINIMAP"], @@ -171,11 +171,11 @@ Shitlist.options = { name = L["SHITLIST_SETTINGS_MINIMAP_ICON"], desc = L["SHITLIST_SETTINGS_MINIMAP_ICON_DESC"], get = function(info) - return Shitlist.db.profile.minimap.hide; + return PersonalPlayerNotes.db.profile.minimap.hide; end, set = function(info, value) - Shitlist.db.profile.minimap.hide = value; - Shitlist:RefreshConfig(); + PersonalPlayerNotes.db.profile.minimap.hide = value; + PersonalPlayerNotes:LoadConfig(); end }, minimapPos = { @@ -185,11 +185,11 @@ Shitlist.options = { desc = L["SHITLIST_SETTINGS_MINIMAP_POS_DESC"], width = 1.5, get = function(info) - return Shitlist.db.profile.minimap.minimapPos; + return PersonalPlayerNotes.db.profile.minimap.minimapPos; end, set = function(info, value) - Shitlist.db.profile.minimap.minimapPos = value; - Shitlist:RefreshConfig(); + PersonalPlayerNotes.db.profile.minimap.minimapPos = value; + PersonalPlayerNotes:LoadConfig(); end, min = 0, max = 360, @@ -224,7 +224,7 @@ Shitlist.options = { name = L["SHITLIST_SETTINGS_ALERT_SOUNDS"], desc = L["SHITLIST_SETTINGS_ALERT_SOUNDS_DESC"], values = function() - return Shitlist.db.profile.alert.sounds + return PersonalPlayerNotes.db.profile.alert.sounds end, width = 1, set = "SetAlertSoundEffect", @@ -249,7 +249,7 @@ Shitlist.options = { order = 2, name = L["SHITLIST_REASONS_TITLE"], inline = false, - handler = Shitlist, + handler = PersonalPlayerNotes, args = { description = { type = "description", @@ -264,13 +264,13 @@ Shitlist.options = { name = L["SHITLIST_REASONS"], values = function() local _return = {} - for key, value in pairs(Shitlist.db.profile.reasons) do + for key, value in pairs(PersonalPlayerNotes.db.profile.reasons) do _return[key] = value.reason end return _return end, - get = "GetReasonSelected", - set = "SetReasonSelected", + get = "GetReason", + set = "SelectedReason", }, remove = { type = "execute", @@ -279,11 +279,11 @@ Shitlist.options = { cmdHidden = true, name = L["SHITLIST_REASON_REMOVE"], confirm = function() - return L["SHITLIST_REASON_REMOVE_CONFIRMATION"] .. Shitlist.db.profile.reason.reason .. "|cffffffff?"; + return L["SHITLIST_REASON_REMOVE_CONFIRMATION"] .. PersonalPlayerNotes.db.profile.reason.reason .. "|cffffffff?"; end, func = "RemoveReason", disabled = function() - if (Shitlist.db.profile.reason.id <= #Shitlist.defaults.profile.reasons) then + if (PersonalPlayerNotes.db.profile.reason.id <= #PersonalPlayerNotes.defaults.profile.reasons) then return true end return false @@ -322,7 +322,7 @@ Shitlist.options = { order = 3, name = L["SHITLIST_LISTED_PLAYERS_TITLE"], inline = true, - handler = Shitlist, + handler = PersonalPlayerNotes, args = { id = { type = "select", @@ -331,7 +331,7 @@ Shitlist.options = { name = L["SHITLIST_LISTED_PLAYERS"], values = function() local _return = {} - for key, value in pairs(Shitlist:GetListedPlayers()) do + for key, value in pairs(PersonalPlayerNotes:GetListedPlayers()) do _return[key] = value.name .. "-" .. value.realm end return _return @@ -347,8 +347,8 @@ Shitlist.options = { name = L["SHITLIST_LISTED_PLAYER_REMOVE"], confirm = function() return L["SHITLIST_LISTED_PLAYER_REMOVE_CONFIRMATION"] .. - Shitlist.db.profile.listedPlayer.name .. - "-" .. Shitlist.db.profile.listedPlayer.realm .. "|cffffffff?"; + PersonalPlayerNotes.db.profile.listedPlayer.name .. + "-" .. PersonalPlayerNotes.db.profile.listedPlayer.realm .. "|cffffffff?"; end, func = "RemoveListedPlayer", }, @@ -375,7 +375,7 @@ Shitlist.options = { name = L["SHITLIST_LISTED_PLAYER_REASON"], values = function() local _return = {} - for key, value in pairs(Shitlist:GetReasons()) do + for key, value in pairs(PersonalPlayerNotes:GetReasons()) do _return[key] = value.reason end return _return @@ -409,7 +409,7 @@ Shitlist.options = { get = "GetListedPlayerAlert", set = "SetListedPlayerAlert", disabled = function() - return not Shitlist.db.profile.reasons[Shitlist.db.profile.listedPlayer.reason].alert + return not PersonalPlayerNotes.db.profile.reasons[PersonalPlayerNotes.db.profile.listedPlayer.reason].alert end, }, } @@ -418,27 +418,27 @@ Shitlist.options = { --#region Sound -function Shitlist:GetAlert(info) +function PersonalPlayerNotes:GetAlert(info) return self.db.profile.alert[info[#info]] end -function Shitlist:SetAlert(info, value) +function PersonalPlayerNotes:SetAlert(info, value) self.db.profile.alert[info[#info]] = value end -function Shitlist:GetAlertSoundEffect(info) +function PersonalPlayerNotes:GetAlertSoundEffect(info) return self.db.profile.alert.sound end -function Shitlist:SetAlertSoundEffect(info, value) +function PersonalPlayerNotes:SetAlertSoundEffect(info, value) self:PlayAlertSoundEffect(value) self.db.profile.alert.sound = value end -function Shitlist:PlayAlertSoundEffect(effect, channel) +function PersonalPlayerNotes:PlayAlertSoundEffect(effect, channel) PlaySoundFile( "Interface\\AddOns\\" .. - shitlist .. "\\Sounds\\" .. Shitlist.db.profile.alert.sounds[effect or self:GetAlertSoundEffect()] .. ".ogg", + personalPlayerNotes .. "\\Sounds\\" .. PersonalPlayerNotes.db.profile.alert.sounds[effect or self:GetAlertSoundEffect()] .. ".ogg", channel or "master" ) end @@ -450,31 +450,19 @@ end --[[ Returns all reasons ]] --- -function Shitlist:GetReasons() +function PersonalPlayerNotes:GetReasons() return self.db.profile.reasons end -function Shitlist:GetReasonSelected(info) - return self.db.profile.reason[info[#info]] +function PersonalPlayerNotes:SetReasons(data) + self.db.profile.reasons = data end -function Shitlist:SetReasonSelected(info, value) - local r = self.db.profile.reasons[value] - if (not r) then - return - end - self.db.profile.reason[info[#info]] = value - self.db.profile.reason.reason = r.reason - self.db.profile.reason.color = r.color - self.db.profile.reason.alert = r.alert -end - -function Shitlist:GetReason(info) +function PersonalPlayerNotes:GetReason(info) return self.db.profile.reason[info[#info]] end -function Shitlist:SetReason(info, value) +function PersonalPlayerNotes:SetReason(info, value) self.db.profile.reason[info[#info]] = value if (self.db.profile.reasons[self.db.profile.reason.id].reason == value) then return @@ -488,39 +476,47 @@ function Shitlist:SetReason(info, value) alert = true }) self.db.profile.reason.id = #self.db.profile.reasons - -- self.db.profile.reason.color = { r = 1, g = 1, b = 1 } - -- self.db.profile.reason.alert = { r = 1, g = 1, b = 1 } - self:SetReasonSelected(info, self.db.profile.reason.id) - self:GetReasonSelected(info) + self:SelectedReason(info, self.db.profile.reason.id) + self:GetReason(info) + end +end + +function PersonalPlayerNotes:SelectedReason(info, value) + local r = self.db.profile.reasons[value] + if (not r) then + return end + self.db.profile.reason[info[#info]] = value + self.db.profile.reason.reason = r.reason + self.db.profile.reason.color = r.color + self.db.profile.reason.alert = r.alert end -function Shitlist:RemoveReason() - tremove(Shitlist.db.profile.reasons, Shitlist.db.profile.reason.id) - --Shitlist.db.profile.reasons[Shitlist.db.profile.reason.id] = nil - local reasons = Shitlist:GetReasons() - Shitlist.db.profile.reason.id = #reasons - Shitlist.db.profile.reason.reason = reasons[#reasons].reason - Shitlist.db.profile.reason.color = reasons[#reasons].color - Shitlist.db.profile.reason.alert = reasons[#reasons].alert +function PersonalPlayerNotes:RemoveReason() + tremove(PersonalPlayerNotes.db.profile.reasons, PersonalPlayerNotes.db.profile.reason.id) + local reasons = PersonalPlayerNotes:GetReasons() + PersonalPlayerNotes.db.profile.reason.id = #reasons + PersonalPlayerNotes.db.profile.reason.reason = reasons[#reasons].reason + PersonalPlayerNotes.db.profile.reason.color = reasons[#reasons].color + PersonalPlayerNotes.db.profile.reason.alert = reasons[#reasons].alert return true; end -function Shitlist:GetReasonColor(info) +function PersonalPlayerNotes:GetReasonColor(info) local c = self.db.profile.reason[info[#info]] return c.r or 1, c.g or 1, c.b or 1 end -function Shitlist:SetReasonColor(info, r, g, b) +function PersonalPlayerNotes:SetReasonColor(info, r, g, b) local c = self.db.profile.reason[info[#info]] c.r, c.g, c.b = r or 1, g or 1, b or 1 end -function Shitlist:GetReasonAlert(info) +function PersonalPlayerNotes:GetReasonAlert(info) return self.db.profile.reason[info[#info]] end -function Shitlist:SetReasonAlert(info, value) +function PersonalPlayerNotes:SetReasonAlert(info, value) self.db.profile.reason[info[#info]] = value local reason = self:GetReasons()[self.db.profile.reason.id] reason.alert = value @@ -532,15 +528,15 @@ end --[[ Returns all listed players. -]]-- -function Shitlist:GetListedPlayers() +]] +function PersonalPlayerNotes:GetListedPlayers() return self.db.profile.listedPlayers end --[[ Return listed player data by name and realm. -]]-- -function Shitlist:GetListedPlayer(name, realm) +]] +function PersonalPlayerNotes:GetListedPlayer(name, realm) for index, value in pairs(self.db.profile.listedPlayers) do if (tostring(name) == value.name and tostring(realm) == value.realm) then return self.db.profile.listedPlayers[index] @@ -551,15 +547,15 @@ end --[[ Return the current selected player data. -]]-- -function Shitlist:GetListedPlayerSelected(info) +]] +function PersonalPlayerNotes:GetListedPlayerSelected(info) return self.db.profile.listedPlayer[info[#info]] end --[[ Set player data by current selected player data. -]]-- -function Shitlist:SetListedPlayerSelected(info, value) +]] +function PersonalPlayerNotes:SetListedPlayerSelected(info, value) self.db.profile.listedPlayer[info[#info]] = value local player = self.db.profile.listedPlayers[self.db.profile.listedPlayer.id] if (player) then @@ -573,14 +569,14 @@ function Shitlist:SetListedPlayerSelected(info, value) end end -function Shitlist:GetListedPlayerRealm(info) +function PersonalPlayerNotes:GetListedPlayerRealm(info) return self.db.profile.listedPlayer[info[#info]] end -function Shitlist:SetListedPlayerRealm(info, value) +function PersonalPlayerNotes:SetListedPlayerRealm(info, value) self.db.profile.listedPlayer[info[#info]] = value - local player = Shitlist:GetListedPlayers()[self.db.profile.listedPlayer.id] - --local player = Shitlist:GetListedPlayer(self.db.profile.listedPlayer.name, value) + local player = PersonalPlayerNotes:GetListedPlayers()[self.db.profile.listedPlayer.id] + --local player = PersonalPlayerNotes:GetListedPlayer(self.db.profile.listedPlayer.name, value) if (player) then player.id = self.db.profile.listedPlayer.id player.name = self.db.profile.listedPlayer.name @@ -592,14 +588,14 @@ function Shitlist:SetListedPlayerRealm(info, value) end end -function Shitlist:GetListedPlayerName(info) +function PersonalPlayerNotes:GetListedPlayerName(info) return self.db.profile.listedPlayer[info[#info]] end -function Shitlist:SetListedPlayerName(info, value) +function PersonalPlayerNotes:SetListedPlayerName(info, value) self.db.profile.listedPlayer[info[#info]] = value - --local player = Shitlist:GetListedPlayers()[self.db.profile.listedPlayer.id] - local player = Shitlist:GetListedPlayer(value, self.db.profile.listedPlayer.realm) + --local player = PersonalPlayerNotes:GetListedPlayers()[self.db.profile.listedPlayer.id] + local player = PersonalPlayerNotes:GetListedPlayer(value, self.db.profile.listedPlayer.realm) if (player) then player.id = self.db.profile.listedPlayer.id player.name = value @@ -609,15 +605,15 @@ function Shitlist:SetListedPlayerName(info, value) player.color = self.db.profile.listedPlayer.color player.alert = self.db.profile.listedPlayer.alert else - local new = Shitlist:NewListedPlayer(value, self.db.profile.listedPlayer.realm) - Shitlist:SetListedPlayerSelected(info, new.id) - Shitlist:GetListedPlayerSelected(info) + local new = PersonalPlayerNotes:NewListedPlayer(value, self.db.profile.listedPlayer.realm) + PersonalPlayerNotes:SetListedPlayerSelected(info, new.id) + PersonalPlayerNotes:GetListedPlayerSelected(info) end end -function Shitlist:RemoveListedPlayer() +function PersonalPlayerNotes:RemoveListedPlayer() tremove(self.db.profile.listedPlayers, self.db.profile.listedPlayer.id) - local listedPlayers = Shitlist:GetListedPlayers() + local listedPlayers = PersonalPlayerNotes:GetListedPlayers() self.db.profile.listedPlayer.id = #listedPlayers self.db.profile.listedPlayer.name = listedPlayers[#listedPlayers].name self.db.profile.listedPlayer.realm = listedPlayers[#listedPlayers].realm @@ -628,37 +624,37 @@ function Shitlist:RemoveListedPlayer() return true end -function Shitlist:GetListedPlayerSelectedReason(info) +function PersonalPlayerNotes:GetListedPlayerSelectedReason(info) return self.db.profile.listedPlayer[info[#info]] end -function Shitlist:SetListedPlayerSelectedReason(info, value) +function PersonalPlayerNotes:SetListedPlayerSelectedReason(info, value) self.db.profile.listedPlayer[info[#info]] = value - local player = Shitlist:GetListedPlayers()[self.db.profile.listedPlayer.id] + local player = PersonalPlayerNotes:GetListedPlayers()[self.db.profile.listedPlayer.id] player.reason = value end -function Shitlist:GetListedPlayerSelectedDescription(info) +function PersonalPlayerNotes:GetListedPlayerSelectedDescription(info) return self.db.profile.listedPlayer[info[#info]] end -function Shitlist:SetListedPlayerSelectedDescription(info, value) +function PersonalPlayerNotes:SetListedPlayerSelectedDescription(info, value) self.db.profile.listedPlayer[info[#info]] = value - local player = Shitlist:GetListedPlayers()[self.db.profile.listedPlayer.id] + local player = PersonalPlayerNotes:GetListedPlayers()[self.db.profile.listedPlayer.id] player.description = value end -function Shitlist:GetListedPlayerColor(info) +function PersonalPlayerNotes:GetListedPlayerColor(info) local c = self.db.profile.listedPlayer[info[#info]] return c.r or 1, c.g or 1, c.b or 1 end -function Shitlist:SetListedPlayerColor(info, r, g, b) +function PersonalPlayerNotes:SetListedPlayerColor(info, r, g, b) local c = self.db.profile.listedPlayer[info[#info]] c.r, c.g, c.b = r or 1, g or 1, b or 1 end -function Shitlist:NewListedPlayer(name, realm, reason, description) +function PersonalPlayerNotes:NewListedPlayer(name, realm, reason, description) self.db.profile.listedPlayer.id = #self.db.profile.listedPlayers + 1 local newPlayer = { id = self.db.profile.listedPlayer.id, @@ -673,13 +669,13 @@ function Shitlist:NewListedPlayer(name, realm, reason, description) return newPlayer end -function Shitlist:GetListedPlayerAlert(info) +function PersonalPlayerNotes:GetListedPlayerAlert(info) return self.db.profile.listedPlayer[info[#info]] end -function Shitlist:SetListedPlayerAlert(info, value) +function PersonalPlayerNotes:SetListedPlayerAlert(info, value) self.db.profile.listedPlayer[info[#info]] = value - local player = Shitlist:GetListedPlayers()[self.db.profile.listedPlayer.id] + local player = PersonalPlayerNotes:GetListedPlayers()[self.db.profile.listedPlayer.id] player.alert = value end diff --git a/PersonalPlayerNotesUtils.lua b/PersonalPlayerNotesUtils.lua index b778f38..7335d03 100644 --- a/PersonalPlayerNotesUtils.lua +++ b/PersonalPlayerNotesUtils.lua @@ -1,39 +1,39 @@ -local shitlist = ... -local L = LibStub("AceLocale-3.0"):GetLocale(shitlist, true) +local personalPlayerNotes = ... +local L = LibStub("AceLocale-3.0"):GetLocale(personalPlayerNotes, true) -function Shitlist:GetVersion() - return tostring(GetAddOnMetadata(shitlist, "Version")) or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetVersion() + return tostring(GetAddOnMetadata(personalPlayerNotes, "Version")) or L["SHITLIST_NA"]; end -function Shitlist:GetTitle() - return GetAddOnMetadata(shitlist, "Title") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetTitle() + return GetAddOnMetadata(personalPlayerNotes, "Title") or L["SHITLIST_NA"]; end -function Shitlist:GetAuthor() - return GetAddOnMetadata(shitlist, "Author") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetAuthor() + return GetAddOnMetadata(personalPlayerNotes, "Author") or L["SHITLIST_NA"]; end -function Shitlist:GetNotes() - return GetAddOnMetadata(shitlist, "Notes") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetNotes() + return GetAddOnMetadata(personalPlayerNotes, "Notes") or L["SHITLIST_NA"]; end -function Shitlist:GetLocalizations() - return GetAddOnMetadata(shitlist, "X-Localizations") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetLocalizations() + return GetAddOnMetadata(personalPlayerNotes, "X-Localizations") or L["SHITLIST_NA"]; end -function Shitlist:GetCategory() - return GetAddOnMetadata(shitlist, "X-Category") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetCategory() + return GetAddOnMetadata(personalPlayerNotes, "X-Category") or L["SHITLIST_NA"]; end -function Shitlist:GetWebsite() - return GetAddOnMetadata(shitlist, "X-Website") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetWebsite() + return GetAddOnMetadata(personalPlayerNotes, "X-Website") or L["SHITLIST_NA"]; end -function Shitlist:GetLicense() - return GetAddOnMetadata(shitlist, "X-License") or L["SHITLIST_NA"]; +function PersonalPlayerNotes:GetLicense() + return GetAddOnMetadata(personalPlayerNotes, "X-License") or L["SHITLIST_NA"]; end -function Shitlist:AceGUIDefaults() +function PersonalPlayerNotes:AceGUIDefaults() local aceGUI = LibStub("AceGUI-3.0"):Create("Frame") aceGUI:SetCallback("OnClose", function(widget) aceGUI:Release() end) aceGUI:SetLayout("Fill") @@ -44,7 +44,7 @@ function Shitlist:AceGUIDefaults() return aceGUI end -function Shitlist:Print(...) +function PersonalPlayerNotes:Print(...) if (self.db and self.db.profile.debug) then return print(L["SHITLIST_DEBUG"], ...) end @@ -52,7 +52,7 @@ function Shitlist:Print(...) end --@debug@ -function Shitlist:PrintDebug(...) +function PersonalPlayerNotes:PrintDebug(...) if (self.db and self.db.profile.debug) then self:Print(...) end diff --git a/PersonalPlayerNotes_Cata.toc b/PersonalPlayerNotes_Cata.toc index 803069e..2419622 100644 --- a/PersonalPlayerNotes_Cata.toc +++ b/PersonalPlayerNotes_Cata.toc @@ -1,11 +1,11 @@ ## Interface: 40400 ## Title : Personal Player Notes -## Notes: Set a personal comment on players and show it on the player information tooltip window. +## Notes: Set a personal comment on players and adding it to player information tooltip. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: PersonalPlayerNotesDB +## SavedVariables: PersonalPlayerNotesDB, ShitlistDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 diff --git a/PersonalPlayerNotes_Vanilla.toc b/PersonalPlayerNotes_Vanilla.toc index 98cbff3..98f8ae9 100644 --- a/PersonalPlayerNotes_Vanilla.toc +++ b/PersonalPlayerNotes_Vanilla.toc @@ -1,11 +1,11 @@ ## Interface: 11503 ## Title : Personal Player Notes -## Notes: Set a personal comment on players and show it on the player information tooltip window. +## Notes: Set a personal comment on players and adding it to player information tooltip. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: PersonalPlayerNotesDB +## SavedVariables: PersonalPlayerNotesDB, ShitlistDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 diff --git a/PersonalPlayerNotes_Wrath.toc b/PersonalPlayerNotes_Wrath.toc index 435e9f4..e6d3508 100644 --- a/PersonalPlayerNotes_Wrath.toc +++ b/PersonalPlayerNotes_Wrath.toc @@ -1,11 +1,11 @@ ## Interface: 30403 ## Title : Personal Player Notes -## Notes: Set a personal comment on players and show it on the player information tooltip window. +## Notes: Set a personal comment on players and adding it to player information tooltip. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: PersonalPlayerNotesDB +## SavedVariables: PersonalPlayerNotesDB, ShitlistDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 diff --git a/README.md b/README.md index 27c62e0..6146296 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,13 @@ [![Check formating](https://github.com/Limmek/Shitlist/actions/workflows/luacheck.yml/badge.svg)](https://github.com/Limmek/Shitlist/actions/workflows/luacheck.yml) [![Interface versions](https://github.com/Limmek/Shitlist/actions/workflows/interface-version.yml/badge.svg)](https://github.com/Limmek/Shitlist/actions/workflows/interface-version.yml) [![Package and release](https://github.com/Limmek/Shitlist/actions/workflows/build.yml/badge.svg)](https://github.com/Limmek/Shitlist/actions/workflows/build.yml) -# Shitlist -Tired of encountering players who've made your gaming experiences less enjoyable? Whether remembering the heroes or the not-so-great allies, **#Shitlist** is the solution. This WoW addon lets you create different preset reasons and personalized comments on players, tracking the good, the bad, and everything in between. +# Personal Player Notes *(former #Shitlist)* +Set personal notes and pre-defined descriptions on players to remind your self in the future. The note and pre-defined description is displayed in the game tooltip. Both descriptions and notes support different colors and a alert sound. -## Features to Enhance Your Gaming Experience - -- **Player Note Tracking**: Reasons and player notes are conveniently displayed on tooltips. -- **Personalized Player Notes**: Craft colored notes and preset reason with alert effect to tailor your gaming experiences. -- **Effortless Player Management**: Easily add, edit, or remove players and their associated reasons, even if they're offline or not your current target. -- **Accessible Minimap Icon**: Swiftly access Shitlist options, reasons, and listed players through the minimap icon for seamless on-the-go management. -- **Alert System**: Set up sound alerts for listed players or specific reasons, ensuring you're promptly informed when encountering them. - -## How to Utilize - -- **Options**: Navigate to **Interface Options -> Addons -> Shitlist -> Options** or access if from the **Minimap Icon**. -- **Customizing Reasons**: Modify preset reasons by visiting **Interface Options -> Addons -> Shitlist -> Reasons**. -- **Adding/Editing Players**: Right-click a player to add or remove them from the #Shitlist. Alternatively, Modify listed players by visiting **Interface Options -> Addons -> Shitlist -> Listed Players** for comprehensive player management. - -## Versatile Applications - -This addon proves invaluable across various in-game scenarios: - -- **Questing**: Recall helpful or troublesome players encountered during quests. -- **Raids & Dungeons**: Track valuable teammates or identify those causing issues. -- **World & PvP**: Easily identify players during intense battles or tricky situations. -- **Preventing Hassles**: Avoid repeated encounters with troublesome players. -- **Blacklisting Capability**: Use #Shitlist as a blacklist, steering clear of unwanted interactions. - -## Download & Contribution +### Notes and pre-defined Descriptions can be set and managed: +- By right-clicking on a unit frame or in chat +- From a GUI interface or addon options +- Minimap button to GUI interface or to open addon options - **Download Now**: Latest release can be found on [Github](https://github.com/Limmek/Shitlist/releases) or ~~[Curse Forge](https://www.curseforge.com/wow/addons/shitlist)~~(*They removed it due to violating their ToS*)..