From 0a6d8333a7fb918073ef9979a5c251030619e949 Mon Sep 17 00:00:00 2001 From: Limmek Date: Wed, 7 Aug 2024 11:51:41 +0000 Subject: [PATCH 01/13] Rename from Shitlist to Personal Player Notes --- .github/ISSUE_TEMPLATE/bug_report.yaml | 5 ++--- .github/issuecomplete.yml | 1 - .vscode/settings.json | 17 ++++++++++++++++- Shitlist.lua => PersonalPlayerNotes.lua | 0 Shitlist.toc => PersonalPlayerNotes.toc | 12 ++++++------ ...tConfig.lua => PersonalPlayerNotesConfig.lua | 0 ...istUtils.lua => PersonalPlayerNotesUtils.lua | 0 ...ist_Cata.toc => PersonalPlayerNotes_Cata.toc | 14 +++++++------- ...nilla.toc => PersonalPlayerNotes_Vanilla.toc | 12 ++++++------ ...t_Wrath.toc => PersonalPlayerNotes_Wrath.toc | 12 ++++++------ 10 files changed, 43 insertions(+), 30 deletions(-) rename Shitlist.lua => PersonalPlayerNotes.lua (100%) rename Shitlist.toc => PersonalPlayerNotes.toc (65%) rename ShitlistConfig.lua => PersonalPlayerNotesConfig.lua (100%) rename ShitlistUtils.lua => PersonalPlayerNotesUtils.lua (100%) rename Shitlist_Cata.toc => PersonalPlayerNotes_Cata.toc (58%) rename Shitlist_Vanilla.toc => PersonalPlayerNotes_Vanilla.toc (62%) rename Shitlist_Wrath.toc => PersonalPlayerNotes_Wrath.toc (62%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index b3d2bf0..3bf3c32 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -26,15 +26,14 @@ body: options: - Retail (Default) - Classic - - Wrath of the Lich King Classic validations: required: true - type: checkboxes id: testing attributes: - label: Tested with only Shitlist - description: Did you try having Shitlist as the only enabled addon and everything else disabled? + label: Tested with only Personal Player Notes + description: Did you try having Personal Player Notes as the only enabled addon and everything else disabled? options: - label: "Yes" required: true diff --git a/.github/issuecomplete.yml b/.github/issuecomplete.yml index a29afb1..908bc5a 100644 --- a/.github/issuecomplete.yml +++ b/.github/issuecomplete.yml @@ -15,4 +15,3 @@ keywords: - version - Retail - Classic - - Wotlk diff --git a/.vscode/settings.json b/.vscode/settings.json index 9c5b188..beba907 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -122,6 +122,21 @@ "SendChatMessage", "ipairs", "UnitFullName", - "PlaySoundFile" + "PlaySoundFile", + "Menu" + ], + "Lua.runtime.builtin": { + "basic": "disable", + "debug": "disable", + "io": "disable", + "math": "disable", + "os": "disable", + "package": "disable", + "string": "disable", + "table": "disable", + "utf8": "disable" + }, + "Lua.workspace.library": [ + "/home/codespace/.vscode-remote/extensions/ketho.wow-api-0.15.5/Annotations" ], } \ No newline at end of file diff --git a/Shitlist.lua b/PersonalPlayerNotes.lua similarity index 100% rename from Shitlist.lua rename to PersonalPlayerNotes.lua diff --git a/Shitlist.toc b/PersonalPlayerNotes.toc similarity index 65% rename from Shitlist.toc rename to PersonalPlayerNotes.toc index f39afd2..81d6a9e 100644 --- a/Shitlist.toc +++ b/PersonalPlayerNotes.toc @@ -1,11 +1,11 @@ ## Interface: 110002 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. +## Title : Personal Player Notes +## Notes: Set a personal comment on players and show it on the player information tooltip window. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB +## SavedVariables: PersonalPlayerNotesDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 @@ -18,6 +18,6 @@ embeds.xml Locales\Locales.xml -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua +PersonalPlayerNotes.lua +PersonalPlayerNotesUtils.lua +PersonalPlayerNotesConfig.lua diff --git a/ShitlistConfig.lua b/PersonalPlayerNotesConfig.lua similarity index 100% rename from ShitlistConfig.lua rename to PersonalPlayerNotesConfig.lua diff --git a/ShitlistUtils.lua b/PersonalPlayerNotesUtils.lua similarity index 100% rename from ShitlistUtils.lua rename to PersonalPlayerNotesUtils.lua diff --git a/Shitlist_Cata.toc b/PersonalPlayerNotes_Cata.toc similarity index 58% rename from Shitlist_Cata.toc rename to PersonalPlayerNotes_Cata.toc index 0694d28..803069e 100644 --- a/Shitlist_Cata.toc +++ b/PersonalPlayerNotes_Cata.toc @@ -1,15 +1,15 @@ ## Interface: 40400 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. +## Title : Personal Player Notes +## Notes: Set a personal comment on players and show it on the player information tooltip window. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB +## SavedVariables: PersonalPlayerNotesDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 -## X-Localizations: enUS +## X-Localizations: enUS, zhCN ## X-Website: https://github.com/Limmek/Shitlist ## X-License: MIT @@ -17,6 +17,6 @@ embeds.xml Locales\Locales.xml -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua +PersonalPlayerNotes.lua +PersonalPlayerNotesUtils.lua +PersonalPlayerNotesConfig.lua diff --git a/Shitlist_Vanilla.toc b/PersonalPlayerNotes_Vanilla.toc similarity index 62% rename from Shitlist_Vanilla.toc rename to PersonalPlayerNotes_Vanilla.toc index 25f0ea3..45018c8 100644 --- a/Shitlist_Vanilla.toc +++ b/PersonalPlayerNotes_Vanilla.toc @@ -1,11 +1,11 @@ ## Interface: 11503 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. +## Title : Personal Player Notes +## Notes: Set a personal comment on players and show it on the player information tooltip window. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB +## SavedVariables: PersonalPlayerNotesDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 @@ -17,6 +17,6 @@ embeds.xml Locales\Locales.xml -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua +PersonalPlayerNotes.lua +PersonalPlayerNotesUtils.lua +PersonalPlayerNotesConfig.lua diff --git a/Shitlist_Wrath.toc b/PersonalPlayerNotes_Wrath.toc similarity index 62% rename from Shitlist_Wrath.toc rename to PersonalPlayerNotes_Wrath.toc index 09900ce..f748fd4 100644 --- a/Shitlist_Wrath.toc +++ b/PersonalPlayerNotes_Wrath.toc @@ -1,11 +1,11 @@ ## Interface: 30403 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. +## Title : Personal Player Notes +## Notes: Set a personal comment on players and show it on the player information tooltip window. ## Author: Limmek ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB +## SavedVariables: PersonalPlayerNotesDB ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 @@ -17,6 +17,6 @@ embeds.xml Locales\Locales.xml -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua +PersonalPlayerNotes.lua +PersonalPlayerNotesUtils.lua +PersonalPlayerNotesConfig.lua From 7334b5834d9f024ecf5bea58ab01a1c6d8f5d7bf Mon Sep 17 00:00:00 2001 From: Limmek Date: Wed, 7 Aug 2024 12:14:53 +0000 Subject: [PATCH 02/13] Changes needed to not violate CurseForge ToS #16 --- Images/{shitlist.png => icon.png} | Bin PersonalPlayerNotes.lua | 34 +++++++++++++----------------- PersonalPlayerNotes.toc | 4 ++-- PersonalPlayerNotesUtils.lua | 1 - PersonalPlayerNotes_Vanilla.toc | 2 +- PersonalPlayerNotes_Wrath.toc | 2 +- 6 files changed, 19 insertions(+), 24 deletions(-) rename Images/{shitlist.png => icon.png} (100%) diff --git a/Images/shitlist.png b/Images/icon.png similarity index 100% rename from Images/shitlist.png rename to Images/icon.png diff --git a/PersonalPlayerNotes.lua b/PersonalPlayerNotes.lua index c9cdc17..981931f 100644 --- a/PersonalPlayerNotes.lua +++ b/PersonalPlayerNotes.lua @@ -44,7 +44,10 @@ function Shitlist:OnInitialize() -- https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0 self:RegisterChatCommand("slm", "ToggleMiniMapIcon") + + --@debug@ self:RegisterChatCommand("sldebug", "ToggleDebug") + --@end-debug@ self:GetOldConfigData() self:RefreshConfig() @@ -56,13 +59,12 @@ function Shitlist:OnEnable() 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()) - -- Retail 10.0.2 https://wowpedia.fandom.com/wiki/Patch_10.0.2/API_changes#Tooltip_Changes if (self.IsRetail) then -- New Menu System in Retail 11.0.0 -- https://warcraft.wiki.gg/wiki/Patch_11.0.0/API_changes -- https://www.townlong-yak.com/framexml/latest/Blizzard_Menu/11_0_0_MenuImplementationGuide.lua - self.DropDownMenuInitialize() - + self:DropDownMenuInitialize() + -- Retail 10.0.2 https://wowpedia.fandom.com/wiki/Patch_10.0.2/API_changes#Tooltip_Changes TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, self.GameTooltip) else if not self:IsHooked("UnitPopup_ShowMenu") then @@ -95,6 +97,7 @@ function Shitlist:RefreshConfig() end function Shitlist:GetOldConfigData() + -- TODO: Add support to use the new PersonalPlayerNotesDB and move old data to the new DB. if _G.ShitlistDB.ListedPlayers == nil and _G.ShitlistDB.Reasons == nil then return end @@ -164,10 +167,13 @@ end function Shitlist:DropDownMenuInitialize() local DropDownMenu = function(ownerRegion, rootDescription, contextData) - local name, realm = contextData.name, nil - if contextData.unit ~= nil then - name, realm = UnitName(contextData.unit) + -- verify the unit + if contextData.unit == nil or not UnitIsPlayer(contextData.unit) then + return end + -- retrieve name and realm from wow api + local name, realm = UnitName(contextData.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) @@ -246,19 +252,7 @@ function Shitlist:UnitPopup_ShowMenu(target, unit, menuList) --@debug@ Shitlist:PrintDebug("Unit: ", unit, ", Target: ", target) --@end-debug@ - --if target == "SELF" then - -- return - --end - --if not (UnitIsPlayer(unit)) or (unit == nil and target == "FRIEND" or target == "COMMUNITIES_GUILD_MEMBER") then - -- return - --end - - --local name, realm = self.name, GetRealmName() - --if unit ~= nil then - -- name, realm = UnitName(unit) - -- if realm == nil then realm = GetRealmName() end - --end - -- rewrite code statement to make it more clear for future enhancement - Jason 20240801 + -- verify the target if target == "SELF" or target == "FRIEND" or target == "COMMUNITIES_GUILD_MEMBER" then return @@ -505,7 +499,9 @@ function Shitlist:ToggleMiniMapIcon() self:RefreshConfig() end +--@debug@ function Shitlist:ToggleDebug() self.db.profile.debug = not self.db.profile.debug self:RefreshConfig() end +--@end-debug@ diff --git a/PersonalPlayerNotes.toc b/PersonalPlayerNotes.toc index 81d6a9e..f191d25 100644 --- a/PersonalPlayerNotes.toc +++ b/PersonalPlayerNotes.toc @@ -9,10 +9,10 @@ ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 -## X-Localizations: enUS +## X-Localizations: enUS, zhCN ## X-Website: https://github.com/Limmek/Shitlist ## X-License: MIT -## IconTexture: Interface\AddOns\Shitlist\Images\shitlist.png +## IconTexture: Interface\AddOns\Shitlist\Images\icon.png embeds.xml diff --git a/PersonalPlayerNotesUtils.lua b/PersonalPlayerNotesUtils.lua index e41a53c..b778f38 100644 --- a/PersonalPlayerNotesUtils.lua +++ b/PersonalPlayerNotesUtils.lua @@ -57,5 +57,4 @@ function Shitlist:PrintDebug(...) self:Print(...) end end - --@end-debug@ diff --git a/PersonalPlayerNotes_Vanilla.toc b/PersonalPlayerNotes_Vanilla.toc index 45018c8..98cbff3 100644 --- a/PersonalPlayerNotes_Vanilla.toc +++ b/PersonalPlayerNotes_Vanilla.toc @@ -9,7 +9,7 @@ ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 -## X-Localizations: enUS +## X-Localizations: enUS, zhCN ## X-Website: https://github.com/Limmek/Shitlist ## X-License: MIT diff --git a/PersonalPlayerNotes_Wrath.toc b/PersonalPlayerNotes_Wrath.toc index f748fd4..435e9f4 100644 --- a/PersonalPlayerNotes_Wrath.toc +++ b/PersonalPlayerNotes_Wrath.toc @@ -9,7 +9,7 @@ ## DefaultState: enabled ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 -## X-Localizations: enUS +## X-Localizations: enUS, zhCN ## X-Website: https://github.com/Limmek/Shitlist ## X-License: MIT From 0a7ad5bccb16039590727e09287e5575c365ea83 Mon Sep 17 00:00:00 2001 From: Limmek Date: Wed, 7 Aug 2024 13:36:32 +0000 Subject: [PATCH 03/13] Removed Announcement --- .vscode/settings.json | 1 - Locales/enUS.lua | 18 ------ Locales/zhCN.lua | 18 ------ PersonalPlayerNotes.lua | 85 ++------------------------ PersonalPlayerNotesConfig.lua | 108 +++++++++------------------------- 5 files changed, 32 insertions(+), 198 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index beba907..c9a8012 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -38,7 +38,6 @@ "GetCursorPosition", "InterfaceOptions_AddCategory", "Enum", - "GetItemInfo", "UIDropDownMenu_CreateInfo", "SlashCmdList", "AddDoubleLine", diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 0521312..6b91657 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -55,18 +55,6 @@ L["SHITLIST_SETTINGS_MINIMAP_ICON"] = "Hide the icon."; L["SHITLIST_SETTINGS_MINIMAP_ICON_DESC"] = "Show or hide the minimap icon."; L["SHITLIST_SETTINGS_MINIMAP_POS"] = "Position"; L["SHITLIST_SETTINGS_MINIMAP_POS_DESC"] = "Set the position of the minimap icon."; -L["SHITLIST_SETTINGS_ANNOUNCEMENT"] = "Announcement"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_DESC"] = "Set which chat channels you can send player info to."; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_PARY"] = "Party"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_PARY_DESC"] = ""; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_RAID"] = "Raid"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_RAID_DESC"] = ""; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_INSTANCE"] = "Instance"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_INSTANCE_DESC"] = ""; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_GUILD"] = "Guild"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_GUILD_DESC"] = ""; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_DELAY"] = "Delay"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_DELAY_DESC"] = ""; L["SHITLIST_SETTINGS_ALERT"] = "Alert"; L["SHITLIST_SETTINGS_ALERT_DESC"] = "Alert when a listed player is found."; @@ -103,14 +91,8 @@ L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED_DESC"] = L["SHITLIST_POPUP_ADD"] = "Add to Shitlist"; L["SHITLIST_POPUP_EDIT"] = "Edit Player"; -L["SHITLIST_POPUP_ANNOUNCEMENT"] = "Announcement"; L["SHITLIST_POPUP_NEW_ADDED"] = "Added"; -L["SHITLIST_POPUP_ANNOUNCEMENT_GUILD"] = "Guild"; -L["SHITLIST_POPUP_ANNOUNCEMENT_PARTY"] = "Party"; -L["SHITLIST_POPUP_ANNOUNCEMENT_INSTANCE_CHAT"] = "Instance"; -L["SHITLIST_POPUP_ANNOUNCEMENT_RAID"] = "Raid"; - L["SHITLIST_MINIMAP_TOOLTIP_TITLE"] = "Shitlist" 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." diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index bd1b213..65b0692 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -56,18 +56,6 @@ L["SHITLIST_SETTINGS_MINIMAP_ICON"] = "隐藏图标"; L["SHITLIST_SETTINGS_MINIMAP_ICON_DESC"] = "显示或隐藏小地图图标"; L["SHITLIST_SETTINGS_MINIMAP_POS"] = "图标位置"; L["SHITLIST_SETTINGS_MINIMAP_POS_DESC"] = "调整小地图图标位置"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT"] = "聊天频道通告"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_DESC"] = "当发现已关注的玩家时允许向哪些聊天频道发布信息"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_PARY"] = "小队"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_PARY_DESC"] = "在小队聊天频道中发布关注名单通告"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_RAID"] = "团队"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_RAID_DESC"] = "在团队聊天频道中发布关注名单通告"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_INSTANCE"] = "副本"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_INSTANCE_DESC"] = "在副本聊天频道中发布关注名单通告"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_GUILD"] = "公会"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_GUILD_DESC"] = "在公会聊天频道中发布关注名单通告"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_DELAY"] = "发送延迟"; -L["SHITLIST_SETTINGS_ANNOUNCEMENT_DELAY_DESC"] = "设置通告发送前的延迟时间(秒),以减少对聊天频道的干扰"; L["SHITLIST_SETTINGS_ALERT"] = "提示音"; L["SHITLIST_SETTINGS_ALERT_DESC"] = "配置当发现已关注的玩家时播放的提示音"; @@ -104,14 +92,8 @@ L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED_DESC"] = L["SHITLIST_POPUP_ADD"] = "添加到关注名单"; L["SHITLIST_POPUP_EDIT"] = "编辑关注信息"; -L["SHITLIST_POPUP_ANNOUNCEMENT"] = "聊天频道通告"; L["SHITLIST_POPUP_NEW_ADDED"] = "已成功添加到关注名单"; -L["SHITLIST_POPUP_ANNOUNCEMENT_GUILD"] = "公会"; -L["SHITLIST_POPUP_ANNOUNCEMENT_PARTY"] = "小队"; -L["SHITLIST_POPUP_ANNOUNCEMENT_INSTANCE_CHAT"] = "副本"; -L["SHITLIST_POPUP_ANNOUNCEMENT_RAID"] = "团队"; - L["SHITLIST_MINIMAP_TOOLTIP_TITLE"] = "关注名单" L["SHITLIST_MINIMAP_TOOLTIP_RIGHT_CLICK"] = "|cFFD2B48C 右键点击|cff00ff00 打开插件选项." L["SHITLIST_MINIMAP_TOOLTIP_LEFT_CLICK"] = "|cFFD2B48C 左键点击|cff00ff00 打开全局设置." diff --git a/PersonalPlayerNotes.lua b/PersonalPlayerNotes.lua index 981931f..655f846 100644 --- a/PersonalPlayerNotes.lua +++ b/PersonalPlayerNotes.lua @@ -97,7 +97,7 @@ function Shitlist:RefreshConfig() end function Shitlist:GetOldConfigData() - -- TODO: Add support to use the new PersonalPlayerNotesDB and move old data to the new DB. + -- Check if old data exist pre addon 2.0.0 version if _G.ShitlistDB.ListedPlayers == nil and _G.ShitlistDB.Reasons == nil then return end @@ -163,6 +163,8 @@ function Shitlist:GetOldConfigData() _G.ShitlistDB.ListedPlayers = nil _G.ShitlistDB.Reasons = nil end + + -- TODO: Add support to use the new PersonalPlayerNotesDB and move old data to the new DB. end function Shitlist:DropDownMenuInitialize() @@ -215,31 +217,6 @@ function Shitlist:DropDownMenuInitialize() AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) AceConfigDialog:Open("ShitlistSettings Listed_Players") end) - local announcement = Shitlist.db.profile.announcement - if announcement.guild or announcement.party or announcement.instance or announcement.raid then - submenu:CreateDivider() - submenu:CreateTitle(L["SHITLIST_POPUP_ANNOUNCEMENT"]) - end - if announcement.guild then - submenu:CreateButton(L["SHITLIST_POPUP_ANNOUNCEMENT_GUILD"], function() - Shitlist:SendChatMessage("GUILD", listedPlayer) - end) - end - if announcement.party then - submenu:CreateButton(L["SHITLIST_POPUP_ANNOUNCEMENT_PARTY"], function() - Shitlist:SendChatMessage("PARTY", listedPlayer) - end) - end - if announcement.instance then - submenu:CreateButton(L["SHITLIST_POPUP_ANNOUNCEMENT_INSTANCE_CHAT"], function() - Shitlist:SendChatMessage("INSTANCE_CHAT", listedPlayer) - end) - end - if announcement.raid then - submenu:CreateButton(L["SHITLIST_POPUP_ANNOUNCEMENT_RAID"], function() - Shitlist:SendChatMessage("RAID", listedPlayer) - end) - end end end Menu.ModifyMenu("MENU_UNIT_PLAYER", function(...) DropDownMenu(...) end) @@ -341,60 +318,6 @@ function Shitlist:UnitPopup_ShowMenu(target, unit, menuList) end UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) - menuItem = UIDropDownMenu_CreateInfo() - menuItem.text = L["SHITLIST_POPUP_ANNOUNCEMENT"] - menuItem.notCheckable = true - menuItem.isTitle = true - local a = Shitlist.db.profile.announcement - if a.guild or a.party or a.instance or a.raid then - UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) - end - - local options = { - { - text = "Guild", - notCheckable = true, - func = function() Shitlist:SendChatMessage("GUILD", listedPlayer) end, - disabled = not Shitlist.db.profile.announcement.guild - }, - { - text = "Party", - notCheckable = true, - func = function() Shitlist:SendChatMessage("PARTY", listedPlayer) end, - disabled = not Shitlist.db.profile.announcement.party - }, - { - text = "Instance", - notCheckable = true, - func = function() Shitlist:SendChatMessage("INSTANCE_CHAT", listedPlayer) end, - disabled = not Shitlist.db.profile.announcement.instance - }, - { - text = "Raid", - notCheckable = true, - func = function() Shitlist:SendChatMessage("RAID", listedPlayer) end, - disabled = not Shitlist.db.profile.announcement.raid - }, - } - - for _, option in ipairs(options) do - if not option.disabled then - UIDropDownMenu_AddButton(option, UIDROPDOWNMENU_MENU_LEVEL) - end - end - end -end - -function Shitlist:SendChatMessage(chat, listedPlayer) - SendChatMessage(L["SHITLIST_CHAT_PLAYER"] .. listedPlayer.name .. "-" .. listedPlayer.realm, chat, nil, nil) - if Shitlist.db.profile.reasons[listedPlayer.reason].reason ~= "None" then - SendChatMessage(L["SHITLIST_CHAT_REASON"] .. Shitlist.db.profile.reasons[listedPlayer.reason].reason, - chat, - nil, - nil) - end - if listedPlayer.description ~= "" then - SendChatMessage(L["SHITLIST_CHAT_DESCRIPTION"] .. listedPlayer.description, chat, nil, nil) end end @@ -436,7 +359,7 @@ function Shitlist:GameTooltip() if (listedPlayer.alert and not alert.last[name]) then alert.last[name] = time + alert.delay Shitlist:ScheduleTimer("AlertDelayTimer", alert.delay, name) - Shitlist:PlayAlertEffect() + Shitlist:PlayAlertSoundEffect() --@debug@ Shitlist:PrintDebug("|cffff0000|cffffffff Sound effect disabled for player", name, "for", alert.delay, "seconds.") diff --git a/PersonalPlayerNotesConfig.lua b/PersonalPlayerNotesConfig.lua index 7b4ca54..31d9738 100644 --- a/PersonalPlayerNotesConfig.lua +++ b/PersonalPlayerNotesConfig.lua @@ -197,50 +197,6 @@ Shitlist.options = { }, }, }, - announcement = { - name = L["SHITLIST_SETTINGS_ANNOUNCEMENT"], - order = 2, - type = "group", - inline = true, - width = 0.5, - get = "GetAnnouncement", - set = "SetAnnouncement", - args = { - description = { - type = "description", - order = 0, - name = L["SHITLIST_SETTINGS_ANNOUNCEMENT_DESC"], - }, - guild = { - type = "toggle", - order = 1, - name = L["SHITLIST_SETTINGS_ANNOUNCEMENT_GUILD"], - desc = L["SHITLIST_SETTINGS_ANNOUNCEMENT_GUILD_DESC"], - width = 0.5 - }, - party = { - type = "toggle", - order = 2, - name = L["SHITLIST_SETTINGS_ANNOUNCEMENT_PARY"], - desc = L["SHITLIST_SETTINGS_ANNOUNCEMENT_PARY_DESC"], - width = 0.5 - }, - raid = { - type = "toggle", - order = 3, - name = L["SHITLIST_SETTINGS_ANNOUNCEMENT_RAID"], - desc = L["SHITLIST_SETTINGS_ANNOUNCEMENT_RAID_DESC"], - width = 0.5 - }, - instance = { - type = "toggle", - order = 4, - name = L["SHITLIST_SETTINGS_ANNOUNCEMENT_INSTANCE"], - desc = L["SHITLIST_SETTINGS_ANNOUNCEMENT_INSTANCE_DESC"], - width = 0.65 - } - } - }, alert = { name = L["SHITLIST_SETTINGS_ALERT"], order = 3, @@ -460,20 +416,6 @@ Shitlist.options = { } } - ---#region Announcement - -function Shitlist:GetAnnouncement(info) - return self.db.profile.announcement[info[#info]] -end - -function Shitlist:SetAnnouncement(info, value) - self.db.profile.announcement[info[#info]] = value -end - ---#endregion - - --#region Sound function Shitlist:GetAlert(info) @@ -484,8 +426,24 @@ function Shitlist:SetAlert(info, value) self.db.profile.alert[info[#info]] = value end ---#endregion +function Shitlist:GetAlertSoundEffect(info) + return self.db.profile.alert.sound +end + +function Shitlist:SetAlertSoundEffect(info, value) + self:PlayAlertSoundEffect(value) + self.db.profile.alert.sound = value +end + +function Shitlist:PlayAlertSoundEffect(effect, channel) + PlaySoundFile( + "Interface\\AddOns\\" .. + shitlist .. "\\Sounds\\" .. Shitlist.db.profile.alert.sounds[effect or self:GetAlertSoundEffect()] .. ".ogg", + channel or "master" + ) +end +--#endregion --#region Reasons @@ -570,17 +528,18 @@ end --#endregion - --#region Listed Players --[[ - Returns all listed players -]] --- + Returns all listed players. +]]-- function Shitlist:GetListedPlayers() return self.db.profile.listedPlayers end +--[[ + Return listed player data by name and realm. +]]-- function Shitlist:GetListedPlayer(name, realm) for index, value in pairs(self.db.profile.listedPlayers) do if (tostring(name) == value.name and tostring(realm) == value.realm) then @@ -590,10 +549,16 @@ function Shitlist:GetListedPlayer(name, realm) return nil end +--[[ + Return the current selected player data. +]]-- function Shitlist:GetListedPlayerSelected(info) return self.db.profile.listedPlayer[info[#info]] end +--[[ + Set player data by current selected player data. +]]-- function Shitlist:SetListedPlayerSelected(info, value) self.db.profile.listedPlayer[info[#info]] = value local player = self.db.profile.listedPlayers[self.db.profile.listedPlayer.id] @@ -719,20 +684,3 @@ function Shitlist:SetListedPlayerAlert(info, value) end --#endregion - -function Shitlist:GetAlertSoundEffect(info) - return self.db.profile.alert.sound -end - -function Shitlist:SetAlertSoundEffect(info, value) - self:PlayAlertEffect(value) - self.db.profile.alert.sound = value -end - -function Shitlist:PlayAlertEffect(effect, channel) - PlaySoundFile( - "Interface\\AddOns\\" .. - shitlist .. "\\Sounds\\" .. Shitlist.db.profile.alert.sounds[effect or self:GetAlertSoundEffect()] .. ".ogg", - channel or "master" - ) -end From 54092cde1cad8c7537e55044fdc321045ca86baf Mon Sep 17 00:00:00 2001 From: Limmek Date: Thu, 8 Aug 2024 00:22:45 +0200 Subject: [PATCH 04/13] 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_1tTW^#JDB6U5IuA6ZV@9$|UH%>4X$#MrrO5`twN>Y`c4 z?$DR2vgpX1yHhQS$a(twF}KFi3*l$xVtt0sYuo$#IXXGbZicpWFNI&IBC*cBnHy~& zpUuzD*VI3H^r*uwqn3hppGADUuy3+YWFA|5Ofr|0m|EYnT0I7+d!r@qlJ;NfLF27H zr}*0I=U!J^^tu1acf|-*4aBMcvV+F1H{LRe%xf)XMMJ7H!DsK6<;liVPAyFMu}yzH z?>p1G!-aXIZKm63Tk~<^Q_Lv{+P`8GwkWZyRQ`<&VS{`YzpJ^#|Q>b zXZUELtA2)kcESfY`+mg*8f!Tg2}Q-+K+Fp**lN?BUU!6`{sZ;C_W1GY{b>G_cQO29 zV>F(R^E!lW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#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*).. From bcdbcf91d90a8c696290a29ad8bd6b3d2297f4ff Mon Sep 17 00:00:00 2001 From: Limmek Date: Thu, 8 Aug 2024 00:35:40 +0200 Subject: [PATCH 05/13] Refactor .pkgmeta file to include .gitkeep and remove Libs/libs.txt --- .pkgmeta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pkgmeta b/.pkgmeta index 09bf7d6..7e69fdc 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -10,11 +10,11 @@ enable-toc-creation: no ignore: - .gitignore + - .gitkeep - .luacheckrc - .vscode - .github - .pkgmeta - - Libs/libs.txt required-dependencies: From c0106f4b84c97382e96c416aaaf32b611005843e Mon Sep 17 00:00:00 2001 From: Limmek Date: Thu, 8 Aug 2024 00:36:14 +0200 Subject: [PATCH 06/13] Refactor .pkgmeta file to rename package from "Shitlist" to "PersonalPlayerNotes" --- .pkgmeta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pkgmeta b/.pkgmeta index 7e69fdc..6144a4c 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -1,4 +1,4 @@ -package-as: Shitlist +package-as: PersonalPlayerNotes manual-changelog: filename: changelog.txt From 258392658371baee3cf14f9a065eb7640009ab58 Mon Sep 17 00:00:00 2001 From: Limmek Date: Mon, 12 Aug 2024 17:00:40 +0200 Subject: [PATCH 07/13] Changes needed to not violate CurseForge ToS #16 --- .vscode/settings.json | 5 +++-- PersonalPlayerNotes.lua | 35 ++++++++------------------------- PersonalPlayerNotes.toc | 6 +++++- PersonalPlayerNotesConfig.lua | 14 ++++++------- PersonalPlayerNotes_Cata.toc | 22 --------------------- PersonalPlayerNotes_Vanilla.toc | 22 --------------------- PersonalPlayerNotes_Wrath.toc | 22 --------------------- 7 files changed, 23 insertions(+), 103 deletions(-) delete mode 100644 PersonalPlayerNotes_Cata.toc delete mode 100644 PersonalPlayerNotes_Vanilla.toc delete mode 100644 PersonalPlayerNotes_Wrath.toc diff --git a/.vscode/settings.json b/.vscode/settings.json index 2928959..85f7bc9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -129,7 +129,8 @@ "StaticPopup_Show", "C_UI", "CreateColor", - "next" + "next", + "SettingsPanel" ], "Lua.runtime.builtin": { "basic": "disable", @@ -143,6 +144,6 @@ "utf8": "disable" }, "Lua.workspace.library": [ - "c:\\Users\\jim_a\\.vscode\\extensions\\ketho.wow-api-0.15.5\\Annotations" + "$USERPROFILE\\.vscode\\extensions\\ketho.wow-api-0.15.7\\Annotations" ], } \ No newline at end of file diff --git a/PersonalPlayerNotes.lua b/PersonalPlayerNotes.lua index 9f64183..118b43d 100644 --- a/PersonalPlayerNotes.lua +++ b/PersonalPlayerNotes.lua @@ -50,14 +50,10 @@ function PersonalPlayerNotes:OnInitialize() -- https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0 self:RegisterChatCommand("slm", "ToggleMiniMapIcon") - --@debug@ self:RegisterChatCommand("sldebug", "ToggleDebug") - --@end-debug@ local loaded, reason = LoadAddOn("Shitlist") - if not loaded then - self:Print("Failed to load Shitlist because", reason) - else + if loaded then self:GetOldConfigData() end self:LoadConfig() @@ -99,11 +95,9 @@ function PersonalPlayerNotes:LoadConfig() LibDBIcon:Show(personalPlayerNotes) end - --@debug@ self:PrintDebug(L["SHITLIST_CONFIG_REFRESH"]) - self:PrintDebug("Debug:", _G["GREEN_FONT_COLOR_CODE"], self.db.profile.debug) + self:PrintDebug("Debug mode:", _G["GREEN_FONT_COLOR_CODE"], self.db.profile.debug) self:PrintDebug("Mini Map Icon:", _G["GREEN_FONT_COLOR_CODE"], not self.db.profile.minimap.hide) - --@end-debug@ end function PersonalPlayerNotes:GetOldConfigData() @@ -174,12 +168,12 @@ function PersonalPlayerNotes:GetOldConfigData() -- Move old shitlist profiles data to new Personal Player Notes database if ShitlistDB and ShitlistDB.profiles then + self:Print(L["SHITLIST_CONFIG_MIGRATE_OLD_DATA"]) 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 @@ -260,10 +254,7 @@ end -- Classic Deprecated function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) - --@debug@ PersonalPlayerNotes:PrintDebug("Unit: ", unit, ", Target: ", target) - --@end-debug@ - -- verify the target if target == "SELF" or target == "FRIEND" or target == "COMMUNITIES_GUILD_MEMBER" then return @@ -278,9 +269,7 @@ function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) if realm == nil then realm = GetRealmName() end local listedPlayer = PersonalPlayerNotes:GetListedPlayer(name, realm) - --@debug@ 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 @@ -370,12 +359,10 @@ function PersonalPlayerNotes:GameTooltip() local _reason = reason local _listedPlayer = listedPlayer - --@debug@ PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Playername:", name, "Realm:", realm, "Reason:", _reason .reason, "Note:", _listedPlayer.description) - --@end-debug@ -- Tooltip if not (_reason.reason == "None" and _listedPlayer.description == "") then @@ -394,20 +381,16 @@ function PersonalPlayerNotes:GameTooltip() alert.last[name] = time + alert.delay PersonalPlayerNotes:ScheduleTimer("AlertDelayTimer", alert.delay, name) PersonalPlayerNotes:PlayAlertSoundEffect() - --@debug@ PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Sound effect disabled for player", name, "for", alert.delay, "seconds.") - --@end-debug@ end end end function PersonalPlayerNotes:AlertDelayTimer(name) -- Called within ScheduleTimer and fires when timer ends. - --@debug@ PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Sound effect is now enabled for player", name) - --@end-debug@ PersonalPlayerNotes.db.profile.alert.last[name] = nil end @@ -416,15 +399,16 @@ function PersonalPlayerNotes:MiniMapIcon() -- https://github.com/tekkub/libdatabroker-1-1/wiki/How-to-provide-a-dataobject return LibDataBroker:NewDataObject(personalPlayerNotes, { type = "launcher", - text = personalPlayerNotes, + text = L["SHITLIST"], icon = PersonalPlayerNotes.db.profile.icon, OnClick = function(clickedframe, button) - AceConfigDialog:Close("PersonalPlayerNotesSettings Options") + HideUIPanel(SettingsPanel) + HideUIPanel(GameMenuFrame) AceConfigDialog:CloseAll() - local AceGUI = PersonalPlayerNotes:AceGUIDefaults() if button == "RightButton" then - InterfaceOptionsFrame_OpenToCategory(personalPlayerNotes) + Settings.OpenToCategory(personalPlayerNotes, "PersonalPlayerNotesSettings Info") elseif button == "LeftButton" then + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() if IsShiftKeyDown() then AceGUI:SetTitle(L["SHITLIST_REASONS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Reasons", 500, 200) @@ -458,10 +442,7 @@ function PersonalPlayerNotes:ToggleMiniMapIcon() self:LoadConfig() end ---@debug@ function PersonalPlayerNotes:ToggleDebug() self.db.profile.debug = not self.db.profile.debug self:LoadConfig() end - ---@end-debug@ diff --git a/PersonalPlayerNotes.toc b/PersonalPlayerNotes.toc index 634a7b0..97d4765 100644 --- a/PersonalPlayerNotes.toc +++ b/PersonalPlayerNotes.toc @@ -1,7 +1,11 @@ ## Interface: 110002 +## Interface-Classic: 11503 +## Interface-Wrath: 30403 +## Interface-Cata: 40400 ## Title : Personal Player Notes ## Notes: Set a personal comment on players and adding it to player information tooltip. -## Author: Limmek +## Notes-zhCN: Set a personal comment on players and adding it to player information tooltip. +## Author: Limmek, JasonDepp ## Version: @project-version@ ## Dependencies: ## OptionalDeps: Shitlist, Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 diff --git a/PersonalPlayerNotesConfig.lua b/PersonalPlayerNotesConfig.lua index 0ebbde3..2c78b65 100644 --- a/PersonalPlayerNotesConfig.lua +++ b/PersonalPlayerNotesConfig.lua @@ -16,10 +16,7 @@ PersonalPlayerNotes.defaults = { time = 0 }, reasons = { - { id = 1, reason = "None", color = { r = 1, g = 1, b = 1 }, alert = false, }, - { id = 2, reason = "Kill Stealing", color = { r = 0, g = 0, b = 1 }, alert = true, }, - { id = 3, reason = "Ninja Looting", color = { r = 1, g = 0, b = 0 }, alert = true, }, - { id = 4, reason = "Spamming", color = { r = 0, g = 1, b = 0 }, alert = true, }, + { id = 1, reason = "None", color = { r = 1, g = 1, b = 1 }, alert = false, }, }, reason = { id = 1, reason = "None", color = { r = 1, g = 1, b = 1 } }, listedPlayer = { @@ -279,7 +276,8 @@ PersonalPlayerNotes.options = { cmdHidden = true, name = L["SHITLIST_REASON_REMOVE"], confirm = function() - return L["SHITLIST_REASON_REMOVE_CONFIRMATION"] .. PersonalPlayerNotes.db.profile.reason.reason .. "|cffffffff?"; + return L["SHITLIST_REASON_REMOVE_CONFIRMATION"] .. + PersonalPlayerNotes.db.profile.reason.reason .. "|cffffffff?"; end, func = "RemoveReason", disabled = function() @@ -409,7 +407,8 @@ PersonalPlayerNotes.options = { get = "GetListedPlayerAlert", set = "SetListedPlayerAlert", disabled = function() - return not PersonalPlayerNotes.db.profile.reasons[PersonalPlayerNotes.db.profile.listedPlayer.reason].alert + return not PersonalPlayerNotes.db.profile.reasons + [PersonalPlayerNotes.db.profile.listedPlayer.reason].alert end, }, } @@ -438,7 +437,8 @@ end function PersonalPlayerNotes:PlayAlertSoundEffect(effect, channel) PlaySoundFile( "Interface\\AddOns\\" .. - personalPlayerNotes .. "\\Sounds\\" .. PersonalPlayerNotes.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 diff --git a/PersonalPlayerNotes_Cata.toc b/PersonalPlayerNotes_Cata.toc deleted file mode 100644 index 2419622..0000000 --- a/PersonalPlayerNotes_Cata.toc +++ /dev/null @@ -1,22 +0,0 @@ -## Interface: 40400 -## Title : Personal Player Notes -## 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, ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS, zhCN -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT - -embeds.xml - -Locales\Locales.xml - -PersonalPlayerNotes.lua -PersonalPlayerNotesUtils.lua -PersonalPlayerNotesConfig.lua diff --git a/PersonalPlayerNotes_Vanilla.toc b/PersonalPlayerNotes_Vanilla.toc deleted file mode 100644 index 98f8ae9..0000000 --- a/PersonalPlayerNotes_Vanilla.toc +++ /dev/null @@ -1,22 +0,0 @@ -## Interface: 11503 -## Title : Personal Player Notes -## 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, ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS, zhCN -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT - -embeds.xml - -Locales\Locales.xml - -PersonalPlayerNotes.lua -PersonalPlayerNotesUtils.lua -PersonalPlayerNotesConfig.lua diff --git a/PersonalPlayerNotes_Wrath.toc b/PersonalPlayerNotes_Wrath.toc deleted file mode 100644 index e6d3508..0000000 --- a/PersonalPlayerNotes_Wrath.toc +++ /dev/null @@ -1,22 +0,0 @@ -## Interface: 30403 -## Title : Personal Player Notes -## 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, ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS, zhCN -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT - -embeds.xml - -Locales\Locales.xml - -PersonalPlayerNotes.lua -PersonalPlayerNotesUtils.lua -PersonalPlayerNotesConfig.lua From 91660b863075b91c0f0dd5cf938edf5b535fedfc Mon Sep 17 00:00:00 2001 From: Limmek Date: Mon, 19 Aug 2024 19:57:13 +0200 Subject: [PATCH 08/13] Changes needed to not violate CurseForge ToS #16 --- .luacheckrc | 387 +--------------------------------- .vscode/settings.json | 125 ++--------- Locales/enUS.lua | 200 +++++++++--------- Locales/zhCN.lua | 198 +++++++++-------- PersonalPlayerNotes.lua | 114 +++++----- PersonalPlayerNotes.toc | 2 +- PersonalPlayerNotesConfig.lua | 133 ++++++------ PersonalPlayerNotesUtils.lua | 22 +- changelog.txt | 17 +- 9 files changed, 353 insertions(+), 845 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index c3997b2..78af5e6 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,17 +1,10 @@ std = "lua51" --- self = false --- unused_args = false -max_line_length = false --- max_code_line_length = false --- max_string_line_length = false --- max_comment_line_length = false +self = false --- include_files = { --- "Shitlist.lua", --- "ShitlistConfig.lua", --- "ShitlistUtils.lua", --- "Locales/*.lua" --- } +max_line_length = false +max_code_line_length = false +max_string_line_length = false +max_comment_line_length = false exclude_files = { "libs/", @@ -31,372 +24,6 @@ ignore = { "542", -- empty if branch } -globals = { - "Shitlist" -} - -read_globals = { - "bit", - "math", - "ceil", "floor", - "abs", "mod", "max", - "sin", "cos", "tan", - "hooksecurefunc", - "table", "tinsert", "tContains", "tAppendAll", "tDeleteItem", "wipe", "MergeTable", - "string", "tostringall", "strtrim", "strmatch", "strjoin", "strsplit", "strlower", - "time", - - -- our own globals +globals = {} - -- misc custom, third party libraries - "LibStub", "tekDebug", - "AceGUIWidgetLSMlists", - "ChatThrottleLib", - "GetAuctionBuyout", - "TomTom", - "DBM", - - -- API functions - "C_AreaPoiInfo", - "C_Calendar", - "C_ChatInfo", - "C_Covenants", - "C_CovenantSanctumUI", - "C_CurrencyInfo", - "C_DateAndTime", - "C_GamePad", - "C_Garrison", - "C_Item", - "C_MajorFactions", - "C_Map", - "C_Minimap", - "C_MountJournal", - "C_NamePlate", - "C_PetJournal", - "C_QuestLog", - "C_Spell", - "C_SuperTrack", - "C_TaskQuest", - "C_Texture", - "C_Timer", - "C_TooltipInfo", - "C_ToyBox", - "C_Transmog", - "C_TransmogCollection", - "C_UnitAuras", - "C_VignetteInfo", - "TransmogUtil", - "UiMapPoint", - "Debug", - "Enum", - "BankButtonIDToInvSlotID", - "ContainerIDToInventoryID", - "ReagentBankButtonIDToInvSlotID", - "Ambiguate", - "CombatLogGetCurrentEventInfo", - "CreateColor", - "CreateColorFromBytes", - "CreateMacro", - "CursorHasItem", - "DeleteCursorItem", - "EditMacro", - "EnumerateServerChannels", - "FlashClientIcon", - "GetAddOnInfo", - "GetAddOnMetadata", - "GetAchievementCriteriaInfo", - "GetAchievementCriteriaInfoByID", - "GetAchievementInfo", - "GetAchievementLink", - "GetAchievementNumCriteria", - "GetAuctionItemSubClasses", - "GetBuildInfo", - "GetBackpackAutosortDisabled", - "GetBagSlotFlag", - "GetBankAutosortDisabled", - "GetBankBagSlotFlag", - "GetChannelName", - "GetContainerNumFreeSlots", - "GetContainerNumSlots", - "GetContainerItemID", - "GetContainerItemInfo", - "GetContainerItemLink", - "GetCurrentGuildBankTab", - "GetCurrentMapAreaID", - "GetCursorInfo", - "GetCVar", - "GetFactionInfoByID", - "GetGuildBankItemInfo", - "GetGuildBankItemLink", - "GetGuildBankTabInfo", - "GetGuildBankNumSlots", - "GetInventoryItemLink", - "GetItemClassInfo", - "GetItemCount", - "GetItemFamily", - "GetItemInfo", - "GetItemInfoInstant", - "GetItemQualityColor", - "GetItemSpecInfo", - "GetLocale", - "GetMacroIndexByName", - "GetNumGroupMembers", - "GetNumMacros", - "GetRealmName", - "GetPlayerAuraBySpellID", - "GetPlayerFacing", - "GetRaidTargetIndex", - "GetScreenHeight", - "GetScreenWidth", - "GetSpellInfo", - "GetTime", - "GetZoneText", - "InCinematic", - "InCombatLockdown", - "IsAddOnLoaded", - "IsAltKeyDown", - "IsControlKeyDown", - "IsCosmeticItem", - "IsInCinematicScene", - "IsInGroup", - "IsInGuild", - "IsInInstance", - "IsInRaid", - "IsModifiedClick", - "IsModifierKeyDown", - "IsReagentBankUnlocked", - "IsShiftKeyDown", - "IsSpellKnown", - "LoadAddOn", - "MouseIsOver", - "OpenWorldMap", - "PlaySound", - "PlaySoundFile", - "PlayerHasToy", - "PickupContainerItem", - "PickupGuildBankItem", - "QueryGuildBankTab", - "SendChatMessage", - "SetCVar", - "SetMapByID", - "SetMapToCurrentZone", - "SetRaidTarget", - "SetRaidTargetIconTexture", - "SplitContainerItem", - "SplitGuildBankItem", - "StopSound", - "UnitClass", - "UnitClassification", - "UnitCreatureType", - "UnitExists", - "UnitFactionGroup", - "UnitFullName", - "UnitGUID", - "UnitHealth", - "UnitHealthMax", - "UnitInRange", - "UnitIsAFK", - "UnitIsDead", - "UnitIsGroupLeader", - "UnitIsPlayer", - "UnitIsVisible", - "UnitLevel", - "UnitName", - "UnitOnTaxi", - "UnitPlayerControlled", - "UseContainerItem", - - -- FrameXML frames - "BankFrame", - "MerchantFrame", - "GameTooltip", - "UIParent", - "WorldFrame", - "Minimap", - "WorldMapFrame", - "MountJournal", - "DEFAULT_CHAT_FRAME", - "GameFontHighlightSmall", - - -- FrameXML API - "ChatEdit_InsertLink", - "ChatFrame_OpenChat", - "CopyTable", - "CreateAtlasMarkup", - "CreateTextureMarkup", - "CreateFrame", - "CreateFramePool", - "CreateObjectPool", - "CreateFromMixins", - "CreateAndInitFromMixin", - "Mixin", - "Item", - "ContinuableContainer", - "InterfaceOptionsFrame_OpenToCategory", - "CloseDropDownMenus", - "ToggleDropDownMenu", - "UIDropDownMenu_AddButton", - "UIDropDownMenu_CreateInfo", - "UISpecialFrames", - "ScrollingEdit_OnCursorChanged", - "ScrollingEdit_OnUpdate", - "GameTooltip_Hide", - "GameTooltip_OnLoad", - "GameTooltip_OnTooltipSetItem", - "GameTooltip_OnTooltipSetSpell", - "GameTooltip_OnTooltipSetUnit", - "GameTooltip_OnTooltipSetShoppingItem", - "GameTooltip_OnUpdate", - "GameTooltip_SetTitle", - "GameTooltip_SetDefaultAnchor", - "HandleModifiedItemClick", - "MapCanvasDataProviderMixin", - "MapCanvasPinMixin", - "Vector2DMixin", - "VignettePinMixin", - "WorldMapPOIQuantizerMixin", - "RegionUtil", - "FramePool_HideAndClearAnchors", - "OpenAchievementFrameToAchievement", - "ToggleWorldMap", - "SetItemButtonTexture", - "TooltipDataProcessor", - "TooltipUtil", - - -- FrameXML Constants - "ACHIEVEMENTS", - "ACTION_PARTY_KILL", - "ADD", - "ALL", - "ALT_KEY_TEXT", - "AZERITE_ESSENCE_TOOLTIP_NAME_RANK", - "BACKPACK_CONTAINER", - "BACKPACK_TOOLTIP", - "BAG_CLEANUP_BAGS", - "BAG_FILTER_ICONS", - "BAGSLOT", - "BANK", - "BANK_BAG_PURCHASE", - "BANK_CONTAINER", - "BOSS_DEAD", - "CHAT_MSG_SAY", - "CHAT_MSG_YELL", - "CHAT_MSG_PARTY", - "CHAT_MSG_RAID", - "CHAT_MSG_GUILD", - "CHAT_MSG_OFFICER", - "CLASS_ICON_TCOORDS", - "CLICK_FOR_DETAILS", - "CLOSE", - "COLOR", - "COMMUNITIES_DEFAULT_CHANNEL_NAME", - "COMMUNITIES_INVITE_MANAGER_LINK_TO_CHAT", - "COMPLETE", - "CONFIRM_BUY_BANK_SLOT", - "COVENANT_COLORS", - "CRITERIA_COMPLETED", - "CTRL_KEY_TEXT", - "DEFAULT", - "DRAG_MODEL", - "DONE", - "EMOTE88_CMD1", - "EMOTE410_CMD1", - "ENABLE", - "ENCOUNTER_JOURNAL_ITEM", - "ERR_USE_LOCKED_WITH_ITEM_S", - "EQUIP_CONTAINER", - "GREEN_FONT_COLOR", - "HIDE", - "ICON_LIST", - "ID", - "IGNORE", - "INCOMPLETE", - "ITEM_BIND_QUEST", - "ITEM_BNETACCOUNTBOUND", - "ITEM_CONJURED", - "ITEM_PET_KNOWN", - "ITEM_REQ_SKILL", - "ITEM_SET_NAME", - "ITEM_SOULBOUND", - "LE_BAG_FILTER_FLAG_EQUIPMENT", - "LE_BAG_FILTER_FLAG_IGNORE_CLEANUP", - "LE_EXPANSION_LEVEL_CURRENT", - "LE_EXPANSION_CLASSIC", - "LE_EXPANSION_BURNING_CRUSADE", - "LE_EXPANSION_WRATH_OF_THE_LICH_KING", - "LE_EXPANSION_CATACLYSM", - "LE_EXPANSION_MISTS_OF_PANDARIA", - "LE_EXPANSION_WARLORDS_OF_DRAENOR", - "LE_EXPANSION_LEGION", - "LE_EXPANSION_BATTLE_FOR_AZEROTH", - "LE_EXPANSION_SHADOWLANDS", - "LE_EXPANSION_DRAGONFLIGHT", - "LE_ITEM_CLASS_WEAPON", - "LE_ITEM_CLASS_ARMOR", - "LE_ITEM_CLASS_CONTAINER", - "LE_ITEM_CLASS_GEM", - "LE_ITEM_CLASS_ITEM_ENHANCEMENT", - "LE_ITEM_CLASS_CONSUMABLE", - "LE_ITEM_CLASS_GLYPH", - "LE_ITEM_CLASS_TRADEGOODS", - "LE_ITEM_CLASS_RECIPE", - "LE_ITEM_CLASS_BATTLEPET", - "LE_ITEM_CLASS_QUESTITEM", - "LE_ITEM_CLASS_MISCELLANEOUS", - "LE_ITEM_QUALITY_POOR", - "LE_PARTY_CATEGORY_HOME", - "LE_PARTY_CATEGORY_INSTANCE", - "LOCALIZED_CLASS_NAMES_FEMALE", - "LOCALIZED_CLASS_NAMES_MALE", - "LOCATION_COLON", - "LOOT", - "MAP_PIN", - "MAP_PIN_HYPERLINK", - "MAX_ACCOUNT_MACROS", - "MAX_CONTAINER_ITEMS", - "MOUNT", - "MOVE_FRAME", - "NEED", - "NEVER", - "NEW_ITEM_ATLAS_BY_QUALITY", - "NO", - "NONE", - "NUM_BAG_SLOTS", - "NUM_BANKBAGSLOTS", - "NUM_CONTAINER_FRAMES", - "NUM_LE_BAG_FILTER_FLAGS", - "OBJECTIVES_VIEW_ACHIEVEMENT", - "PARENS_TEMPLATE", - "PREVIEW", - "QUESTS_COLON", - "RAID_CLASS_COLORS", - "REAGENT_BANK", - "REAGENTBANK_CONTAINER", - "REAGENTBANK_DEPOSIT", - "RED_FONT_COLOR", - "REMOVE", - "RETRIEVING_ITEM_INFO", - "SEARCH_LOADING_TEXT", - "SHIFT_KEY_TEXT", - "SOUNDKIT", - "STATICPOPUP_NUMDIALOGS", - "SUBTITLE_FORMAT", - "TARGET", - "TEXTURE_ITEM_QUEST_BANG", - "TEXTURE_ITEM_QUEST_BORDER", - "TEXTURES_SUBHEADER", - "TOOLTIP_BATTLE_PET", - "TOY", - "TRADESKILL_POST", - "UIDROPDOWNMENU_MENU_VALUE", - "UIDROPDOWNMENU_MENU_LEVEL", - "UI_SCALE", - "UNKNOWN", - "UNKNOWNOBJECT", - "USED", - "WOW_PROJECT_ID", - "WOW_PROJECT_MAINLINE", - "WOW_PROJECT_CLASSIC", - "YES", - "ZONE", -} +read_globals = {} diff --git a/.vscode/settings.json b/.vscode/settings.json index 85f7bc9..c52a2b0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,16 @@ { "luacheck.useLuacheck": true, - "editor.wordWrapColumn": 133, + "editor.defaultFormatter": "Ketho.wow-api", + "editor.wordWrap": "wordWrapColumn", + "editor.wordWrapColumn": 256, "editor.rulers": [ - 132 + 256 ], - "editor.wordWrap": "off", - "editor.defaultFormatter": "Ketho.wow-api", + "editor.wrappingIndent": "same", + "editor.accessibilitySupport": "off", "Lua.diagnostics.enable": true, "Lua.runtime.version": "Lua 5.1", + "lua.debug.settings.luaVersion": "lua51", "Lua.completion.callSnippet": "Both", "Lua.diagnostics.disable": [ "undefined-field", @@ -21,116 +24,18 @@ "lowercase-global" ], "Lua.diagnostics.globals": [ - "UnitIsPlayer", - "RegisterChatCommand", - "UIDROPDOWNMENU_MAXBUTTONS", - "ChatFontNormal", - "TooltipDataProcessor", + "Menu", + "StaticPopupDialogs", + "StaticPopup_Show", "UIDROPDOWNMENU_MENU_LEVEL", - "ShitlistSettings", - "Settings", - "NOT_BOUND", - "GetLocale", "UIDropDownMenu_AddButton", - "tremove", - "DEFAULT_CHAT_FRAME", - "FONT_COLOR_CODE_CLOSE", - "GetCursorPosition", - "InterfaceOptions_AddCategory", - "Enum", + "TooltipDataProcessor", + "Settings", "UIDropDownMenu_CreateInfo", - "SlashCmdList", - "AddDoubleLine", - "GameTooltip", - "NORMAL_FONT_COLOR", - "_L", - "UIParentLoadAddOn", - "SetTooltipMoney", - "CreateFrame", - "ACCEPT", - "hash_SlashCmdList", - "RegisterCallback", - "NORMAL_FONT_COLOR_CODE", - "GameFontNormalSmall", - "OKAY", - "NUM_CHAT_WINDOWS", - "FriendsFrame", - "GameFontHighlightLarge", - "GetRealmName", - "UnitName", - "GetUnit", - "CLOSE", - "geterrorhandler", - "testDB", - "OpacitySliderFrame", - "IsSecureCmd", - "Shitlist", - "AddLine", - "SELECTED_CHAT_FRAME", - "GameFontHighlightSmall", - "SetDesaturation", - "ColorPickerFrame", - "ChatEdit_GetActiveWindow", - "UnitPopupMenus", - "ItemRefTooltip", - "IsControlKeyDown", - "print", - "LibStub", - "CANCEL", - "SHITLIST_ID", - "GetMouseFocus", - "ShitlistDB", - "IsShiftKeyDown", - "GameFontDisableSmall", - "UnitPopup_ShowMenu", - "InterfaceOptionsFrame_OpenToCategory", - "GameFontNormal", - "ReloadUI", - "pairs", - "C_Timer", - "GameFontHighlight", - "AuctionDB", - "_G", - "tinsert", - "UIDropDownMenu_AddSeparator", - "time", - "EasyMenu", - "UIDropDownMenu_SetWidth", - "UIDropDownMenu_SetText", - "UIDropDownMenu_Initialize", - "CloseDropDownMenus", - "ToggleDropDownMenu", - "PlayerFrameDropDown", - "UIDropDownMenu_GetText", - "ChatFrame1EditBox", - "TargetFrame", - "PlayerFrame", - "UIDropDownMenu_GetCurrentDropDown", - "UISpecialFrames", - "ChatFrame1", - "GameTooltip_SetDefaultAnchor", - "HIGHLIGHT_FONT_COLOR", - "WorldFrame", - "TooltipBackdropTemplateMixin", + "SettingsPanel", "GameMenuFrame", - "UIDROPDOWNMENU_INIT_MENU", "UIDROPDOWNMENU_MENU_VALUE", - "GetText", - "UIDropDownMenu_GetSelectedName", - "tostring", - "SendChatMessage", - "ipairs", - "UnitFullName", - "PlaySoundFile", - "Menu", - "WOW_PROJECT_ID", - "WOW_PROJECT_MAINLINE", - "StaticPopupDialogs", - "StaticPopup_Show", - "C_UI", - "CreateColor", - "next", - "SettingsPanel" + "ShitlistDB" ], "Lua.runtime.builtin": { "basic": "disable", @@ -144,6 +49,6 @@ "utf8": "disable" }, "Lua.workspace.library": [ - "$USERPROFILE\\.vscode\\extensions\\ketho.wow-api-0.15.7\\Annotations" + "~\\.vscode\\extensions\\ketho.wow-api-0.17.4\\Annotations" ], } \ No newline at end of file diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 38a8576..4ae82e9 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -9,107 +9,101 @@ local L = LibStub("AceLocale-3.0"):NewLocale("PersonalPlayerNotes", "enUS", true -- GOLDENROD |cFFDAA520 -- TAN |cFFD2B48C -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"] = "Personal Player Notes"; -L["SHITLIST_MENU_SETTINGS"] = "Options"; -L["SHITLIST_MENU_REASONS"] = "Reasons"; -L["SHITLIST_MENU_LISTED_PLAYERS"] = "Listed Players"; -L["SHITLIST_MENU_PROFILES"] = "Profiles"; - -L["SHITLIST_CONFIG_LOADING"] = "Loading..."; -L["SHITLIST_CONFIG_LOADED"] = "Loaded."; -L["SHITLIST_CONFIG_VERSION"] = "Version:"; -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:"; - -L["SHITLIST_INFO_COMMANDS_TITLE"] = "Commands"; -L["SHITLIST_INFO_COMMANDS_DESC"] = "All available slash commands."; -L["SHITLIST_INFO_COMMANDS_1"] = "|cFFD2B48C/sli|cffffffff - Show information."; -L["SHITLIST_INFO_COMMANDS_2"] = "|cFFD2B48C/slo|cffffffff - Change options."; -L["SHITLIST_INFO_COMMANDS_3"] = "|cFFD2B48C/slr|cffffffff - Edit reasons."; -L["SHITLIST_INFO_COMMANDS_4"] = "|cFFD2B48C/slp|cffffffff - Edit player information."; -L["SHITLIST_INFO_COMMANDS_5"] = "|cFFD2B48C/slm|cffffffff - Toggle minimap icon."; -L["SHITLIST_INFO_ABOUT_TITLE"] = "About"; -L["SHITLIST_INFO_ABOUT_VERSION"] = "Version"; -L["SHITLIST_INFO_ABOUT_AUTHOR"] = "Author"; -L["SHITLIST_INFO_ABOUT_CATEGORY"] = "Category"; -L["SHITLIST_INFO_ABOUT_LOCALIZATION"] = "Localizations"; -L["SHITLIST_INFO_ABOUT_LICENSE"] = "License"; -L["SHITLIST_INFO_ABOUT_WEB"] = "Website"; - -L["SHITLIST_SETTINGS"] = "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."; -L["SHITLIST_SETTINGS_MINIMAP_POS"] = "Position"; -L["SHITLIST_SETTINGS_MINIMAP_POS_DESC"] = "Set the position of the minimap icon."; - -L["SHITLIST_SETTINGS_ALERT"] = "Alert"; -L["SHITLIST_SETTINGS_ALERT_DESC"] = "Alert when a listed player is found."; -L["SHITLIST_SETTINGS_ALERT_ENABLED"] = "Enabled"; -L["SHITLIST_SETTINGS_ALERT_ENABLED_DESC"] = ""; -L["SHITLIST_SETTINGS_ALERT_SOUNDS"] = "Sounds"; -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"] = "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"; -L["SHITLIST_REASON_REMOVE"] = "Remove Reason"; -L["SHITLIST_REASON_REMOVE_CONFIRMATION"] = "Do you really want to remove reason:\n|cffffd700"; -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"] = "Personal Player Notes - Listed Players"; -L["SHITLIST_LISTED_PLAYERS"] = "Listed Players"; -L["SHITLIST_LISTED_PLAYER"] = "Listed Player"; -L["SHITLIST_LISTED_PLAYER_REMOVE"] = "Remove Player"; -L["SHITLIST_LISTED_PLAYER_REMOVE_CONFIRMATION"] = "Do you really want to remove player:\n|cffffd700"; -L["SHITLIST_LISTED_PLAYER_NAME"] = "Player Name"; -L["SHITLIST_LISTED_PLAYER_REALM"] = "Realm"; -L["SHITLIST_LISTED_PLAYER_REASON"] = "Reason"; -L["SHITLIST_LISTED_PLAYER_DESCRIPTION"] = "Description"; -L["SHITLIST_LISTED_PLAYER_COLOR"] = "Color"; -L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED"] = "Alert" -L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED_DESC"] = +L["PPN"] = "Personal Player Notes"; +L["PPN_DEBUG"] = "|cffff0000[Personal Player Notes]|cffffffff"; +L["PPN_PRINT"] = "|cffffd700[Personal Player Notes]|cffffffff"; + +L["PPN_NA"] = "N/A"; + +L["PPN_DISABLE"] = "Unloading..."; + +L["PPN_MENU_TITLE"] = "Personal Player Notes"; +L["PPN_MENU_SETTINGS"] = "Options"; +L["PPN_MENU_REASONS"] = "Reasons"; +L["PPN_MENU_LISTED_PLAYERS"] = "Listed Players"; +L["PPN_MENU_PROFILES"] = "Profiles"; + +L["PPN_CONFIG_LOADING"] = "Loading..."; +L["PPN_CONFIG_LOADED"] = "Loaded."; +L["PPN_CONFIG_VERSION"] = "Version:"; +L["PPN_CONFIG_REASONS"] = "Reasons:"; +L["PPN_CONFIG_LISTEDPLAYERS"] = "Players:"; +L["PPN_CONFIG_REFRESH"] = "Reloading configuration..."; +L["PPN_CONFIG_CHECK_OLD_DATA"] = "Checking for old player data..."; +L["PPN_CONFIG_MIGRATE_OLD_DATA"] = "Migrating profiles from Shitlist."; +L["PPN_CONFIG_ADDED_OLD_DATA"] = "Added old player:"; +L["PPN_CONFIG_DUPLICATE_DATA"] = "Found duplicate:"; +L["PPN_CONFIG_MIGRATE"] = "Do you want to migrate profiles from Shitlist?"; +L["PPN_CONFIG_MIGRATE_YES"] = "Yes"; +L["PPN_CONFIG_MIGRATE_NO"] = "No"; +L["PPN_CONFIG_MIGRATE_DONE"] = "Profiles from Shitlist has been migrated."; + +L["PPN_INFO_COMMANDS_TITLE"] = "Commands"; +L["PPN_INFO_COMMANDS_DESC"] = "All available slash commands."; +L["PPN_INFO_COMMANDS_1"] = "|cFFD2B48C/ppn|cffffffff - Open Blizzard options."; +L["PPN_INFO_COMMANDS_2"] = "|cFFD2B48C/ppno|cffffffff or |cFFD2B48C/ppnoptions|cffffffff - Change options."; +L["PPN_INFO_COMMANDS_3"] = "|cFFD2B48C/ppnr|cffffffff or |cFFD2B48C/ppnreasons|cffffffff - Edit reasons."; +L["PPN_INFO_COMMANDS_4"] = "|cFFD2B48C/ppnp|cffffffff or |cFFD2B48C/ppnplayers|cffffffff - Edit player information."; +L["PPN_INFO_COMMANDS_5"] = "|cFFD2B48C/ppnm|cffffffff or |cFFD2B48C/ppnminimap|cffffffff - Toggle minimap icon."; +L["PPN_INFO_ABOUT_TITLE"] = "About"; +L["PPN_INFO_ABOUT_VERSION"] = "Version"; +L["PPN_INFO_ABOUT_AUTHOR"] = "Author"; +L["PPN_INFO_ABOUT_CATEGORY"] = "Category"; +L["PPN_INFO_ABOUT_LOCALIZATION"] = "Localizations"; +L["PPN_INFO_ABOUT_LICENSE"] = "License"; +L["PPN_INFO_ABOUT_WEB"] = "Website"; + +L["PPN_SETTINGS"] = "Options"; +L["PPN_SETTINGS_TITLE"] = "Personal Player Notes - Options"; +L["PPN_SETTINGS_MINIMAP"] = "Minimap"; +L["PPN_SETTINGS_MINIMAP_ICON"] = "Hide the icon."; +L["PPN_SETTINGS_MINIMAP_ICON_DESC"] = "Show or hide the minimap icon."; +L["PPN_SETTINGS_MINIMAP_POS"] = "Position"; +L["PPN_SETTINGS_MINIMAP_POS_DESC"] = "Set the position of the minimap icon."; + +L["PPN_SETTINGS_ALERT"] = "Alert"; +L["PPN_SETTINGS_ALERT_DESC"] = "Alert when a listed player is found."; +L["PPN_SETTINGS_ALERT_ENABLED"] = "Enabled"; +L["PPN_SETTINGS_ALERT_ENABLED_DESC"] = ""; +L["PPN_SETTINGS_ALERT_SOUNDS"] = "Sounds"; +L["PPN_SETTINGS_ALERT_SOUNDS_DESC"] = "Select the sound to be played."; +L["PPN_SETTINGS_ALERT_DELAY"] = "Delay"; +L["PPN_SETTINGS_ALERT_DELAY_DESC"] = "How many seconds to sleep before a new alert for the same player is played."; + +L["PPN_REASONS_TITLE"] = "Personal Player Notes - Reasons"; +L["PPN_REASONS"] = "Reasons"; +L["PPN_REASON"] = "Reason"; +L["PPN_REASON_DESCRIPTION"] = "Here you can Edit, Add or Remove differrent reasons.\n"; +L["PPN_REASON_REMOVE"] = "Remove Reason"; +L["PPN_REASON_REMOVE_CONFIRMATION"] = "Do you really want to remove reason:\n|cffffd700"; +L["PPN_REASON_COLOR"] = "Select a color"; +L["PPN_REASON_ALERT_ENABLED"] = "Alert" +L["PPN_REASON_ALERT_ENABLED_DESC"] = "Toggle sound effect for all players with this reason." +L["PPN_DEFAULT_REASON"] = "None"; + +L["PPN_LISTED_PLAYERS_TITLE"] = "Personal Player Notes - Listed Players"; +L["PPN_LISTED_PLAYERS"] = "Listed Players"; +L["PPN_LISTED_PLAYER"] = "Listed Player"; +L["PPN_LISTED_PLAYER_REMOVE"] = "Remove Player"; +L["PPN_LISTED_PLAYER_REMOVE_CONFIRMATION"] = "Do you really want to remove player:\n|cffffd700"; +L["PPN_LISTED_PLAYER_NAME"] = "Player Name"; +L["PPN_LISTED_PLAYER_REALM"] = "Realm"; +L["PPN_LISTED_PLAYER_REASON"] = "Reason"; +L["PPN_LISTED_PLAYER_DESCRIPTION"] = "Description"; +L["PPN_LISTED_PLAYER_COLOR"] = "Color"; +L["PPN_LISTED_PLAYER_ALERT_ENABLED"] = "Alert" +L["PPN_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 Player"; -L["SHITLIST_POPUP_EDIT"] = "Edit Player"; -L["SHITLIST_POPUP_NEW_ADDED"] = "Added"; - -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." -L["SHITLIST_MINIMAP_TOOLTIP_CTRL_LEFT_CLICK"] = "|cFFD2B48C CTRL + Left-Click|cff00ff00 to open listed players." - -L["SHITLIST_CHAT_PLAYER"] = "Player:"; -L["SHITLIST_CHAT_REASON"] = "Reason:"; -L["SHITLIST_CHAT_DESCRIPTION"] = "Description:"; - -L["SHITLIST_DEFAULT_REASON"] = "None"; -L["SHITLIST_DEFAULT_REASON_2"] = "Kill Stealing"; -L["SHITLIST_DEFAULT_REASON_3"] = "Ninja Looting"; -L["SHITLIST_DEFAULT_REASON_4"] = "Spamming"; - -L["SHITLIST_EXAMPLE_NAME"] = "Example"; -L["SHITLIST_EXAMPLE_REALM"] = "Silvermoon"; -L["SHITLIST_EXAMPLE_REASON"] = 1; -L["SHITLIST_EXAMPLE_DESC"] = "Example Description"; +L["PPN_LISTED_PLAYERS_EXAMPLE_NAME"] = "Example"; +L["PPN_LISTED_PLAYERS_EXAMPLE_REALM"] = "Silvermoon"; +L["PPN_LISTED_PLAYERS_EXAMPLE_DESC"] = "None"; + +L["PPN_POPUP_ADD"] = "Add Player"; +L["PPN_POPUP_EDIT"] = "Edit Player"; +L["PPN_POPUP_NEW_ADDED"] = "Added"; + +L["PPN_MINIMAP_TOOLTIP_TITLE"] = "Personal Player Notes" +L["PPN_MINIMAP_TOOLTIP_RIGHT_CLICK"] = "|cFFD2B48C Right-Click|cff00ff00 to open Blizzard options." +L["PPN_MINIMAP_TOOLTIP_LEFT_CLICK"] = "|cFFD2B48C Left-Click|cff00ff00 to open options." +L["PPN_MINIMAP_TOOLTIP_SHIFT_LEFT_CLICK"] = "|cFFD2B48C SHIFT + Left-Click|cff00ff00 to open reasons." +L["PPN_MINIMAP_TOOLTIP_CTRL_LEFT_CLICK"] = "|cFFD2B48C CTRL + Left-Click|cff00ff00 to open listed players." diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index 8637176..307f46f 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -10,106 +10,100 @@ if not L then return end -- GOLDENROD |cFFDAA520 -- TAN |cFFD2B48C -L["SHITLIST"] = "关注名单"; -L["SHITLIST_DEBUG"] = "|cffff0000[关注名单]|cffffffff"; -L["SHITLIST_PRINT"] = "|cffffd700[关注名单]|cffffffff"; - -L["SHITLIST_NA"] = "不适用"; - -L["SHITLIST_DISABLE"] = "正在禁用..."; - -L["SHITLIST_MENU_TITLE"] = "ShitList关注名单"; -L["SHITLIST_MENU_SETTINGS"] = "设置选项"; -L["SHITLIST_MENU_REASONS"] = "分组分类设置"; -L["SHITLIST_MENU_LISTED_PLAYERS"] = "已关注的玩家"; -L["SHITLIST_MENU_PROFILES"] = "配置文件"; - -L["SHITLIST_CONFIG_LOADING"] = "正在加载..."; -L["SHITLIST_CONFIG_LOADED"] = "已加载."; -L["SHITLIST_CONFIG_VERSION"] = "版本:"; -L["SHITLIST_CONFIG_REASONS"] = "分组分类:"; -L["SHITLIST_CONFIG_LISTEDPLAYERS"] = "玩家名字:"; -L["SHITLIST_CONFIG_REFRESH"] = "正在重新加载配置..."; -L["SHITLIST_CONFIG_CHECK_OLD_DATA"] = "正在检查历史数据..."; -L["SHITLIST_CONFIG_ADDED_OLD_DATA"] = "已添加历史数据:"; -L["SHITLIST_CONFIG_DUPLICATE_DATA"] = "找到重复数据:"; - -L["SHITLIST_INFO_COMMANDS_TITLE"] = "命令"; -L["SHITLIST_INFO_COMMANDS_DESC"] = "所有可用的斜杠命令"; -L["SHITLIST_INFO_COMMANDS_1"] = "|cFFD2B48C/sli|cffffffff - 显示信息."; -L["SHITLIST_INFO_COMMANDS_2"] = "|cFFD2B48C/slo|cffffffff - 更改选项."; -L["SHITLIST_INFO_COMMANDS_3"] = "|cFFD2B48C/slr|cffffffff - 编辑分组分类."; -L["SHITLIST_INFO_COMMANDS_4"] = "|cFFD2B48C/slp|cffffffff - 编辑玩家信息."; -L["SHITLIST_INFO_COMMANDS_5"] = "|cFFD2B48C/slm|cffffffff - 小地图图标开关."; -L["SHITLIST_INFO_ABOUT_TITLE"] = "关于"; -L["SHITLIST_INFO_ABOUT_VERSION"] = "版本"; -L["SHITLIST_INFO_ABOUT_AUTHOR"] = "作者"; -L["SHITLIST_INFO_ABOUT_CATEGORY"] = "插件类型"; -L["SHITLIST_INFO_ABOUT_LOCALIZATION"] = "本地化"; -L["SHITLIST_INFO_ABOUT_LICENSE"] = "许可证"; -L["SHITLIST_INFO_ABOUT_WEB"] = "发布网站"; - -L["SHITLIST_SETTINGS"] = "设置选项"; -L["SHITLIST_SETTINGS_TITLE"] = "关注名单 - 设置选项"; -L["SHITLIST_SETTINGS_MINIMAP"] = "小地图图标"; -L["SHITLIST_SETTINGS_MINIMAP_ICON"] = "隐藏图标"; -L["SHITLIST_SETTINGS_MINIMAP_ICON_DESC"] = "显示或隐藏小地图图标"; -L["SHITLIST_SETTINGS_MINIMAP_POS"] = "图标位置"; -L["SHITLIST_SETTINGS_MINIMAP_POS_DESC"] = "调整小地图图标位置"; - -L["SHITLIST_SETTINGS_ALERT"] = "提示音"; -L["SHITLIST_SETTINGS_ALERT_DESC"] = "配置当发现已关注的玩家时播放的提示音"; -L["SHITLIST_SETTINGS_ALERT_ENABLED"] = "启用提示音"; -L["SHITLIST_SETTINGS_ALERT_ENABLED_DESC"] = "勾选此选项以启用提示音功能. 当发现已关注的玩家时, 将播放配置的提示音."; -L["SHITLIST_SETTINGS_ALERT_SOUNDS"] = "声音列表"; -L["SHITLIST_SETTINGS_ALERT_SOUNDS_DESC"] = "选择当发现已关注的玩家时要播放的声音."; -L["SHITLIST_SETTINGS_ALERT_DELAY"] = "提示间隔"; -L["SHITLIST_SETTINGS_ALERT_DELAY_DESC"] = "设置在为同一玩家播放下一个提示音之前需要等待的时间(秒). 这有助于防止在短时间内重复播放相同的提示音."; - -L["SHITLIST_REASONS_TITLE"] = "关注名单 - 分组分类设置"; -L["SHITLIST_REASONS"] = "现有分组分类"; -L["SHITLIST_REASON"] = "添加或编辑分组分类"; -L["SHITLIST_REASON_DESCRIPTION"] = "添加,编辑或删除关注名单分组分类\n"; -L["SHITLIST_REASON_REMOVE"] = "删除分组"; -L["SHITLIST_REASON_REMOVE_CONFIRMATION"] = "您确定要删除:\n|cffffd700"; -L["SHITLIST_REASON_COLOR"] = "选择颜色(此分组在鼠标提示中的颜色)"; -L["SHITLIST_REASON_ALERT_ENABLED"] = "启用分组提示音" -L["SHITLIST_REASON_ALERT_ENABLED_DESC"] = "当前分组提示音效开关. 启用后, 当发现此分组内的玩家时, 将播放配置的提示音." - -L["SHITLIST_LISTED_PLAYERS_TITLE"] = "关注名单 - 已关注的玩家"; -L["SHITLIST_LISTED_PLAYERS"] = "已关注的玩家"; -L["SHITLIST_LISTED_PLAYER"] = "已关注的玩家"; -L["SHITLIST_LISTED_PLAYER_REMOVE"] = "取消关注玩家"; -L["SHITLIST_LISTED_PLAYER_REMOVE_CONFIRMATION"] = "你确定要从关注名单里删除:\n|cffffd700"; -L["SHITLIST_LISTED_PLAYER_NAME"] = "玩家名称"; -L["SHITLIST_LISTED_PLAYER_REALM"] = "所在服务器"; -L["SHITLIST_LISTED_PLAYER_REASON"] = "分组分类"; -L["SHITLIST_LISTED_PLAYER_DESCRIPTION"] = "附加描述"; -L["SHITLIST_LISTED_PLAYER_COLOR"] = "文字颜色(此附加描述在鼠标提示中的颜色)"; -L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED"] = "启用玩家提示音" -L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED_DESC"] = +L["PPN"] = "关注名单"; +L["PPN_DEBUG"] = "|cffff0000[关注名单]|cffffffff"; +L["PPN_PRINT"] = "|cffffd700[关注名单]|cffffffff"; + +L["PPN_NA"] = "不适用"; + +L["PPN_DISABLE"] = "正在禁用..."; + +L["PPN_MENU_TITLE"] = "Personal Player Notes"; +L["PPN_MENU_SETTINGS"] = "设置选项"; +L["PPN_MENU_REASONS"] = "分组分类设置"; +L["PPN_MENU_LISTED_PLAYERS"] = "已关注的玩家"; +L["PPN_MENU_PROFILES"] = "配置文件"; + +L["PPN_CONFIG_LOADING"] = "正在加载..."; +L["PPN_CONFIG_LOADED"] = "已加载."; +L["PPN_CONFIG_VERSION"] = "版本:"; +L["PPN_CONFIG_REASONS"] = "分组分类:"; +L["PPN_CONFIG_LISTEDPLAYERS"] = "玩家名字:"; +L["PPN_CONFIG_REFRESH"] = "正在重新加载配置..."; +L["PPN_CONFIG_CHECK_OLD_DATA"] = "正在检查历史数据..."; +L["PPN_CONFIG_ADDED_OLD_DATA"] = "已添加历史数据:"; +L["PPN_CONFIG_DUPLICATE_DATA"] = "找到重复数据:"; +L["PPN_CONFIG_MIGRATE"] = "Do you want to migrate profiles from Shitlist?"; +L["PPN_CONFIG_MIGRATE_YES"] = "Yes"; +L["PPN_CONFIG_MIGRATE_NO"] = "No"; +L["PPN_CONFIG_MIGRATE_DONE"] = "Profiles from Shitlist has been migrated."; + +L["PPN_INFO_COMMANDS_TITLE"] = "命令"; +L["PPN_INFO_COMMANDS_DESC"] = "所有可用的斜杠命令"; +L["PPN_INFO_COMMANDS_1"] = "|cFFD2B48C/ppn|cffffffff - Open Blizzard options."; +L["PPN_INFO_COMMANDS_2"] = "|cFFD2B48C/ppno|cffffffff or |cFFD2B48C/ppnoptions|cffffffff - 更改选项."; +L["PPN_INFO_COMMANDS_3"] = "|cFFD2B48C/ppnr|cffffffff or |cFFD2B48C/ppnreasons|cffffffff - 编辑分组分类."; +L["PPN_INFO_COMMANDS_4"] = "|cFFD2B48C/ppnp|cffffffff or |cFFD2B48C/ppnplayers|cffffffff - 编辑玩家信息."; +L["PPN_INFO_COMMANDS_5"] = "|cFFD2B48C/ppnm|cffffffff or |cFFD2B48C/ppnminimap|cffffffff - 小地图图标开关."; +L["PPN_INFO_ABOUT_TITLE"] = "关于"; +L["PPN_INFO_ABOUT_VERSION"] = "版本"; +L["PPN_INFO_ABOUT_AUTHOR"] = "作者"; +L["PPN_INFO_ABOUT_CATEGORY"] = "插件类型"; +L["PPN_INFO_ABOUT_LOCALIZATION"] = "本地化"; +L["PPN_INFO_ABOUT_LICENSE"] = "许可证"; +L["PPN_INFO_ABOUT_WEB"] = "发布网站"; + +L["PPN_SETTINGS"] = "设置选项"; +L["PPN_SETTINGS_TITLE"] = "关注名单 - 设置选项"; +L["PPN_SETTINGS_MINIMAP"] = "小地图图标"; +L["PPN_SETTINGS_MINIMAP_ICON"] = "隐藏图标"; +L["PPN_SETTINGS_MINIMAP_ICON_DESC"] = "显示或隐藏小地图图标"; +L["PPN_SETTINGS_MINIMAP_POS"] = "图标位置"; +L["PPN_SETTINGS_MINIMAP_POS_DESC"] = "调整小地图图标位置"; + +L["PPN_SETTINGS_ALERT"] = "提示音"; +L["PPN_SETTINGS_ALERT_DESC"] = "配置当发现已关注的玩家时播放的提示音"; +L["PPN_SETTINGS_ALERT_ENABLED"] = "启用提示音"; +L["PPN_SETTINGS_ALERT_ENABLED_DESC"] = "勾选此选项以启用提示音功能. 当发现已关注的玩家时, 将播放配置的提示音."; +L["PPN_SETTINGS_ALERT_SOUNDS"] = "声音列表"; +L["PPN_SETTINGS_ALERT_SOUNDS_DESC"] = "选择当发现已关注的玩家时要播放的声音."; +L["PPN_SETTINGS_ALERT_DELAY"] = "提示间隔"; +L["PPN_SETTINGS_ALERT_DELAY_DESC"] = "设置在为同一玩家播放下一个提示音之前需要等待的时间(秒). 这有助于防止在短时间内重复播放相同的提示音."; + +L["PPN_REASONS_TITLE"] = "关注名单 - 分组分类设置"; +L["PPN_REASONS"] = "现有分组分类"; +L["PPN_REASON"] = "添加或编辑分组分类"; +L["PPN_REASON_DESCRIPTION"] = "添加,编辑或删除关注名单分组分类\n"; +L["PPN_REASON_REMOVE"] = "删除分组"; +L["PPN_REASON_REMOVE_CONFIRMATION"] = "您确定要删除:\n|cffffd700"; +L["PPN_REASON_COLOR"] = "选择颜色(此分组在鼠标提示中的颜色)"; +L["PPN_REASON_ALERT_ENABLED"] = "启用分组提示音" +L["PPN_REASON_ALERT_ENABLED_DESC"] = "当前分组提示音效开关. 启用后, 当发现此分组内的玩家时, 将播放配置的提示音." +L["PPN_DEFAULT_REASON"] = "None"; + +L["PPN_LISTED_PLAYERS_TITLE"] = "关注名单 - 已关注的玩家"; +L["PPN_LISTED_PLAYERS"] = "已关注的玩家"; +L["PPN_LISTED_PLAYER"] = "已关注的玩家"; +L["PPN_LISTED_PLAYER_REMOVE"] = "取消关注玩家"; +L["PPN_LISTED_PLAYER_REMOVE_CONFIRMATION"] = "你确定要从关注名单里删除:\n|cffffd700"; +L["PPN_LISTED_PLAYER_NAME"] = "玩家名称"; +L["PPN_LISTED_PLAYER_REALM"] = "所在服务器"; +L["PPN_LISTED_PLAYER_REASON"] = "分组分类"; +L["PPN_LISTED_PLAYER_DESCRIPTION"] = "附加描述"; +L["PPN_LISTED_PLAYER_COLOR"] = "文字颜色(此附加描述在鼠标提示中的颜色)"; +L["PPN_LISTED_PLAYER_ALERT_ENABLED"] = "启用玩家提示音" +L["PPN_LISTED_PLAYER_ALERT_ENABLED_DESC"] = "为该玩家启用或禁用提示音. 如果该玩家所在的分组分类已禁用了提示音, 则不能开启." - -L["SHITLIST_POPUP_ADD"] = "添加到关注名单"; -L["SHITLIST_POPUP_EDIT"] = "编辑关注信息"; -L["SHITLIST_POPUP_NEW_ADDED"] = "已成功添加到关注名单"; - -L["SHITLIST_MINIMAP_TOOLTIP_TITLE"] = "关注名单" -L["SHITLIST_MINIMAP_TOOLTIP_RIGHT_CLICK"] = "|cFFD2B48C 右键点击|cff00ff00 打开插件选项." -L["SHITLIST_MINIMAP_TOOLTIP_LEFT_CLICK"] = "|cFFD2B48C 左键点击|cff00ff00 打开全局设置." -L["SHITLIST_MINIMAP_TOOLTIP_SHIFT_LEFT_CLICK"] = "|cFFD2B48C SHIFT+左键点击|cff00ff00 管理分组分类." -L["SHITLIST_MINIMAP_TOOLTIP_CTRL_LEFT_CLICK"] = "|cFFD2B48C CTRL+左键点击|cff00ff00 查看已关注的玩家." - -L["SHITLIST_CHAT_PLAYER"] = "玩家:"; -L["SHITLIST_CHAT_REASON"] = "通告原因:"; -L["SHITLIST_CHAT_DESCRIPTION"] = "附加描述:"; - -L["SHITLIST_DEFAULT_REASON"] = "小本本"; -L["SHITLIST_DEFAULT_REASON_2"] = "黑名单"; -L["SHITLIST_DEFAULT_REASON_3"] = "白名单"; -L["SHITLIST_DEFAULT_REASON_4"] = "红名单"; - -L["SHITLIST_EXAMPLE_NAME"] = "变异骷髅"; -L["SHITLIST_EXAMPLE_REALM"] = "灰烬使者"; -L["SHITLIST_EXAMPLE_REASON"] = 1; -L["SHITLIST_EXAMPLE_DESC"] = "ShitList关注名单初代汉化大魔王"; +L["PPN_LISTED_PLAYERS_EXAMPLE_NAME"] = "变异骷髅"; +L["PPN_LISTED_PLAYERS_EXAMPLE_REALM"] = "灰烬使者"; +L["PPN_LISTED_PLAYERS_EXAMPLE_DESC"] = "None"; + +L["PPN_POPUP_ADD"] = "添加到关注名单"; +L["PPN_POPUP_EDIT"] = "编辑关注信息"; +L["PPN_POPUP_NEW_ADDED"] = "已成功添加到关注名单"; + +L["PPN_MINIMAP_TOOLTIP_TITLE"] = "关注名单" +L["PPN_MINIMAP_TOOLTIP_RIGHT_CLICK"] = "|cFFD2B48C 右键点击|cff00ff00 打开插件选项." +L["PPN_MINIMAP_TOOLTIP_LEFT_CLICK"] = "|cFFD2B48C 左键点击|cff00ff00 打开全局设置." +L["PPN_MINIMAP_TOOLTIP_SHIFT_LEFT_CLICK"] = "|cFFD2B48C SHIFT+左键点击|cff00ff00 管理分组分类." +L["PPN_MINIMAP_TOOLTIP_CTRL_LEFT_CLICK"] = "|cFFD2B48C CTRL+左键点击|cff00ff00 查看已关注的玩家." diff --git a/PersonalPlayerNotes.lua b/PersonalPlayerNotes.lua index 118b43d..243bddb 100644 --- a/PersonalPlayerNotes.lua +++ b/PersonalPlayerNotes.lua @@ -27,32 +27,31 @@ function PersonalPlayerNotes:OnInitialize() AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Info", self.options.Info) AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Info", personalPlayerNotes) - AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Options", self.options.Settings, { "slo" }) - AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Options", L["SHITLIST_MENU_SETTINGS"], - personalPlayerNotes) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Options", self.options.Settings, { "ppno", "ppnoptions" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Options", L["PPN_MENU_SETTINGS"], personalPlayerNotes) - AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Reasons", self.options.Reasons, { "slr" }) - AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Reasons", L["SHITLIST_MENU_REASONS"], - personalPlayerNotes) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Reasons", self.options.Reasons, { "ppnr", "ppnreasons" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Reasons", L["PPN_MENU_REASONS"], personalPlayerNotes) - AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Listed_Players", self.options.ListedPlayers, { "slp" }) - AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Listed_Players", L["SHITLIST_MENU_LISTED_PLAYERS"], + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Listed_Players", self.options.ListedPlayers, + { "ppnp", "ppnplayers" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Listed_Players", L["PPN_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("PersonalPlayerNotesSettings Profiles", profiles) - AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Profiles", L["SHITLIST_MENU_PROFILES"], - personalPlayerNotes) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Profiles", L["PPN_MENU_PROFILES"], personalPlayerNotes) 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") + self:RegisterChatCommand("ppn", function() + Settings.OpenToCategory(personalPlayerNotes) + end) + self:RegisterChatCommand("ppnm", "ToggleMiniMapIcon") + self:RegisterChatCommand("ppnminimap", "ToggleMiniMapIcon") + self:RegisterChatCommand("ppndebug", "ToggleDebug") - self:RegisterChatCommand("sldebug", "ToggleDebug") - - local loaded, reason = LoadAddOn("Shitlist") + local loaded, reason = C_AddOns.LoadAddOn("Shitlist") if loaded then self:GetOldConfigData() end @@ -60,10 +59,10 @@ function PersonalPlayerNotes:OnInitialize() end 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()) - self:Print(L["SHITLIST_CONFIG_LISTEDPLAYERS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetListedPlayers()) + self:Print(L["PPN_CONFIG_LOADING"]) + self:Print(L["PPN_CONFIG_VERSION"], _G["ORANGE_FONT_COLOR_CODE"], self:GetVersion()) + self:Print(L["PPN_CONFIG_REASONS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetReasons()) + self:Print(L["PPN_CONFIG_LISTEDPLAYERS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetListedPlayers()) if (self.IsRetail) then -- New Menu System in Retail 11.0.0 @@ -73,17 +72,17 @@ function PersonalPlayerNotes:OnEnable() -- Retail 10.0.2 https://wowpedia.fandom.com/wiki/Patch_10.0.2/API_changes#Tooltip_Changes TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, self.GameTooltip) else + -- Backwards compatibility Classic if not self:IsHooked("UnitPopup_ShowMenu") then self:SecureHook("UnitPopup_ShowMenu", self.UnitPopup_ShowMenu) end - -- Backwards compatibility Classic GameTooltip:HookScript("OnTooltipSetUnit", self.GameTooltip) end - self:Print(L["SHITLIST_CONFIG_LOADED"]) + self:Print(L["PPN_CONFIG_LOADED"]) end function PersonalPlayerNotes:OnDisable() - self:Print(L["SHITLIST_DISABLE"]) + self:Print(L["PPN_DISABLE"]) end function PersonalPlayerNotes:LoadConfig() @@ -95,7 +94,7 @@ function PersonalPlayerNotes:LoadConfig() LibDBIcon:Show(personalPlayerNotes) end - self:PrintDebug(L["SHITLIST_CONFIG_REFRESH"]) + self:PrintDebug(L["PPN_CONFIG_REFRESH"]) self:PrintDebug("Debug mode:", _G["GREEN_FONT_COLOR_CODE"], self.db.profile.debug) self:PrintDebug("Mini Map Icon:", _G["GREEN_FONT_COLOR_CODE"], not self.db.profile.minimap.hide) end @@ -105,7 +104,7 @@ function PersonalPlayerNotes:GetOldConfigData() local listedPlayers = self:GetListedPlayers() -- 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"]) + self:Print(L["PPN_CONFIG_CHECK_OLD_DATA"]) local oldListedPlayers = ShitlistDB.ListedPlayers local newPlayers = {} @@ -153,9 +152,9 @@ function PersonalPlayerNotes:GetOldConfigData() alert = true, } - self:Print(L["SHITLIST_CONFIG_ADDED_OLD_DATA"], name .. "-" .. realm) + self:Print(L["PPN_CONFIG_ADDED_OLD_DATA"], name .. "-" .. realm) else - self:Print(L["SHITLIST_CONFIG_DUPLICATE_DATA"], name .. "-" .. realm) + self:Print(L["PPN_CONFIG_DUPLICATE_DATA"], name .. "-" .. realm) end end end @@ -168,20 +167,20 @@ function PersonalPlayerNotes:GetOldConfigData() -- Move old shitlist profiles data to new Personal Player Notes database if ShitlistDB and ShitlistDB.profiles then - self:Print(L["SHITLIST_CONFIG_MIGRATE_OLD_DATA"]) + self:Print(L["PPN_CONFIG_MIGRATE_OLD_DATA"]) StaticPopupDialogs["MIGRATE_PROFILES"] = { - text = "Do you want to migrate profiles from Shitlist?", - button1 = "Yes", - button2 = "No", + text = L["PPN_CONFIG_MIGRATE"], + button1 = L["PPN_CONFIG_MIGRATE_YES"], + button2 = L["PPN_CONFIG_MIGRATE_NO"], OnAccept = function() 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:Print(L["PPN_CONFIG_REASONS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetReasons()) + self:Print(L["PPN_CONFIG_LISTEDPLAYERS"], _G["GREEN_FONT_COLOR_CODE"], #self:GetListedPlayers()) + PersonalPlayerNotes:Print(L["PPN_CONFIG_MIGRATE_DONE"]) self.db:SetProfile("Default") - DisableAddOn("Shitlist") + C_AddOns.DisableAddOn("Shitlist") C_UI.Reload() end, timeout = 0, @@ -207,9 +206,9 @@ function PersonalPlayerNotes:DropDownMenuInitialize() local listedPlayer = PersonalPlayerNotes:GetListedPlayer(name, realm) if (not listedPlayer) then rootDescription:CreateDivider() - rootDescription:CreateTitle(L["SHITLIST"]) - rootDescription:CreateButton(L["SHITLIST_POPUP_ADD"], function() - PersonalPlayerNotes:Print(L["SHITLIST_POPUP_NEW_ADDED"], name, realm) + rootDescription:CreateTitle(L["PPN"]) + rootDescription:CreateButton(L["PPN_POPUP_ADD"], function() + PersonalPlayerNotes:Print(L["PPN_POPUP_NEW_ADDED"], name, realm) local new_player = PersonalPlayerNotes:NewListedPlayer(name, realm) PersonalPlayerNotes.db.profile.listedPlayer.id = new_player.id @@ -222,15 +221,14 @@ function PersonalPlayerNotes:DropDownMenuInitialize() AceConfigDialog:CloseAll() local AceGUI = PersonalPlayerNotes:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end) else rootDescription:CreateDivider() - rootDescription:CreateTitle(L["SHITLIST"]) - --local submenu = rootDescription:CreateButton(L["SHITLIST"]); - rootDescription:CreateButton(L["SHITLIST_POPUP_EDIT"], function() + rootDescription:CreateTitle(L["PPN"]) + rootDescription:CreateButton(L["PPN_POPUP_EDIT"], function() PersonalPlayerNotes.db.profile.listedPlayer.id = listedPlayer.id PersonalPlayerNotes.db.profile.listedPlayer.name = listedPlayer.name PersonalPlayerNotes.db.profile.listedPlayer.realm = listedPlayer.realm @@ -241,7 +239,7 @@ function PersonalPlayerNotes:DropDownMenuInitialize() AceConfigDialog:CloseAll() local AceGUI = PersonalPlayerNotes:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end) @@ -282,12 +280,12 @@ function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) }, UIDROPDOWNMENU_MENU_LEVEL) else UIDropDownMenu_AddButton({ - text = L["SHITLIST_POPUP_ADD"], + text = L["PPN_POPUP_ADD"], notCheckable = true, icon = PersonalPlayerNotes.db.profile.icon, value = { name, realm }, func = function() - PersonalPlayerNotes:Print(L["SHITLIST_POPUP_NEW_ADDED"], name, realm) + PersonalPlayerNotes:Print(L["PPN_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 @@ -299,7 +297,7 @@ function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) AceConfigDialog:CloseAll() local AceGUI = PersonalPlayerNotes:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end, @@ -318,7 +316,7 @@ function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) menuItem = UIDropDownMenu_CreateInfo() - menuItem.text = L["SHITLIST_POPUP_EDIT"] + menuItem.text = L["PPN_POPUP_EDIT"] menuItem.notCheckable = true menuItem.hasArrow = false menuItem.value = listedPlayer @@ -334,7 +332,7 @@ function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) AceConfigDialog:CloseAll() local AceGUI = PersonalPlayerNotes:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") end @@ -399,26 +397,26 @@ function PersonalPlayerNotes:MiniMapIcon() -- https://github.com/tekkub/libdatabroker-1-1/wiki/How-to-provide-a-dataobject return LibDataBroker:NewDataObject(personalPlayerNotes, { type = "launcher", - text = L["SHITLIST"], + text = L["PPN"], icon = PersonalPlayerNotes.db.profile.icon, OnClick = function(clickedframe, button) HideUIPanel(SettingsPanel) HideUIPanel(GameMenuFrame) AceConfigDialog:CloseAll() if button == "RightButton" then - Settings.OpenToCategory(personalPlayerNotes, "PersonalPlayerNotesSettings Info") + Settings.OpenToCategory(personalPlayerNotes) elseif button == "LeftButton" then local AceGUI = PersonalPlayerNotes:AceGUIDefaults() if IsShiftKeyDown() then - AceGUI:SetTitle(L["SHITLIST_REASONS_TITLE"]) + AceGUI:SetTitle(L["PPN_REASONS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Reasons", 500, 200) AceConfigDialog:Open("PersonalPlayerNotesSettings Reasons") elseif IsControlKeyDown() then - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") else - AceGUI:SetTitle(L["SHITLIST_SETTINGS_TITLE"]) + AceGUI:SetTitle(L["PPN_SETTINGS_TITLE"]) AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Options", 500, 350) AceConfigDialog:Open("PersonalPlayerNotesSettings Options") end @@ -426,13 +424,13 @@ function PersonalPlayerNotes:MiniMapIcon() end, OnTooltipShow = function(tooltip) tooltip:AddDoubleLine( - "|T" .. PersonalPlayerNotes.db.profile.icon .. ":0|t " .. L["SHITLIST_MINIMAP_TOOLTIP_TITLE"], + "|T" .. PersonalPlayerNotes.db.profile.icon .. ":0|t " .. L["PPN_MINIMAP_TOOLTIP_TITLE"], PersonalPlayerNotes:GetVersion()) tooltip:AddLine("\n") - tooltip:AddLine(L["SHITLIST_MINIMAP_TOOLTIP_RIGHT_CLICK"]) - tooltip:AddLine(L["SHITLIST_MINIMAP_TOOLTIP_LEFT_CLICK"]) - tooltip:AddLine(L["SHITLIST_MINIMAP_TOOLTIP_SHIFT_LEFT_CLICK"]) - tooltip:AddLine(L["SHITLIST_MINIMAP_TOOLTIP_CTRL_LEFT_CLICK"]) + tooltip:AddLine(L["PPN_MINIMAP_TOOLTIP_RIGHT_CLICK"]) + tooltip:AddLine(L["PPN_MINIMAP_TOOLTIP_LEFT_CLICK"]) + tooltip:AddLine(L["PPN_MINIMAP_TOOLTIP_SHIFT_LEFT_CLICK"]) + tooltip:AddLine(L["PPN_MINIMAP_TOOLTIP_CTRL_LEFT_CLICK"]) end, }) end diff --git a/PersonalPlayerNotes.toc b/PersonalPlayerNotes.toc index 97d4765..69eb2c1 100644 --- a/PersonalPlayerNotes.toc +++ b/PersonalPlayerNotes.toc @@ -14,7 +14,7 @@ ## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames ## X-Curse-Project-ID: 344967 ## X-Localizations: enUS, zhCN -## X-Website: https://github.com/Limmek/Shitlist +## X-Website: https://github.com/Limmek/PersonalPlayerNotes ## X-License: MIT ## IconTexture: Interface\AddOns\PersonalPlayerNotes\Images\icon.png diff --git a/PersonalPlayerNotesConfig.lua b/PersonalPlayerNotesConfig.lua index 2c78b65..875f8d6 100644 --- a/PersonalPlayerNotesConfig.lua +++ b/PersonalPlayerNotesConfig.lua @@ -6,7 +6,6 @@ PersonalPlayerNotes.defaults = { 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 }, alert = { delay = 10, enabled = true, @@ -16,26 +15,26 @@ PersonalPlayerNotes.defaults = { time = 0 }, reasons = { - { id = 1, reason = "None", color = { r = 1, g = 1, b = 1 }, alert = false, }, + { id = 1, reason = L["PPN_DEFAULT_REASON"], color = { r = 1, g = 1, b = 1 }, alert = false, }, }, - reason = { id = 1, reason = "None", color = { r = 1, g = 1, b = 1 } }, + reason = { id = 1, reason = L["PPN_DEFAULT_REASON"], color = { r = 1, g = 1, b = 1 }, alert = false, }, listedPlayer = { id = 1, - name = "Example", - realm = "Silvermoon", + name = L["PPN_LISTED_PLAYERS_EXAMPLE_NAME"], + realm = L["PPN_LISTED_PLAYERS_EXAMPLE_REALM"], reason = 1, - description = "Example Description", + description = L["PPN_DEFAULT_REASON"], color = { r = 1, g = 1, b = 1 }, alert = true, }, listedPlayers = { { id = 1, - name = "Example", - realm = "Silvermoon", + name = L["PPN_LISTED_PLAYERS_EXAMPLE_NAME"], + realm = L["PPN_LISTED_PLAYERS_EXAMPLE_REALM"], reason = 1, - description = "Example Description", - color = { r = 0, g = 0, b = 0 }, + description = L["PPN_DEFAULT_REASON"], + color = { r = 1, g = 1, b = 1 }, alert = true, }, } @@ -47,7 +46,7 @@ PersonalPlayerNotes.options = { Info = { type = "group", order = 0, - name = L["SHITLIST_MENU_TITLE"], + name = L["PPN_MENU_TITLE"], inline = true, cmdHidden = true, args = { @@ -58,40 +57,46 @@ PersonalPlayerNotes.options = { name = PersonalPlayerNotes:GetNotes() .. "\n\n\n", }, Commands = { - name = L["SHITLIST_INFO_COMMANDS_TITLE"], - desc = L["SHITLIST_INFO_COMMANDS_DESC"], + name = L["PPN_INFO_COMMANDS_TITLE"], + desc = L["PPN_INFO_COMMANDS_DESC"], order = 2, type = "group", inline = true, args = { - options = { + info = { order = 1, type = "description", fontSize = "medium", - name = L["SHITLIST_INFO_COMMANDS_2"], + name = L["PPN_INFO_COMMANDS_1"], }, - reasons = { + options = { order = 2, type = "description", fontSize = "medium", - name = L["SHITLIST_INFO_COMMANDS_3"], + name = L["PPN_INFO_COMMANDS_2"], }, - players = { + reasons = { order = 3, type = "description", fontSize = "medium", - name = L["SHITLIST_INFO_COMMANDS_4"], + name = L["PPN_INFO_COMMANDS_3"], }, - minimap = { + players = { order = 4, type = "description", fontSize = "medium", - name = L["SHITLIST_INFO_COMMANDS_5"], + name = L["PPN_INFO_COMMANDS_4"], + }, + minimap = { + order = 5, + type = "description", + fontSize = "medium", + name = L["PPN_INFO_COMMANDS_5"], }, }, }, About = { - name = L["SHITLIST_INFO_ABOUT_TITLE"], + name = L["PPN_INFO_ABOUT_TITLE"], order = 3, type = "group", inline = true, @@ -101,7 +106,7 @@ PersonalPlayerNotes.options = { order = 0, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_VERSION"] .. + name = "|cffffd700" .. L["PPN_INFO_ABOUT_VERSION"] .. ": |cffff8c00" .. PersonalPlayerNotes:GetVersion() }, author = { @@ -109,7 +114,7 @@ PersonalPlayerNotes.options = { order = 1, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_AUTHOR"] .. + name = "|cffffd700" .. L["PPN_INFO_ABOUT_AUTHOR"] .. ": |cffffffff" .. PersonalPlayerNotes:GetAuthor() }, category = { @@ -117,7 +122,7 @@ PersonalPlayerNotes.options = { order = 2, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_CATEGORY"] .. + name = "|cffffd700" .. L["PPN_INFO_ABOUT_CATEGORY"] .. ": |cffffffff" .. PersonalPlayerNotes:GetCategory() }, localizations = { @@ -125,7 +130,7 @@ PersonalPlayerNotes.options = { order = 3, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_LOCALIZATION"] .. + name = "|cffffd700" .. L["PPN_INFO_ABOUT_LOCALIZATION"] .. ": |cffffffff" .. PersonalPlayerNotes:GetLocalizations() }, license = { @@ -133,7 +138,7 @@ PersonalPlayerNotes.options = { order = 4, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_LICENSE"] .. + name = "|cffffd700" .. L["PPN_INFO_ABOUT_LICENSE"] .. ": |cffffffff" .. PersonalPlayerNotes:GetLicense() }, website = { @@ -141,7 +146,7 @@ PersonalPlayerNotes.options = { order = 5, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_WEB"] .. + name = "|cffffd700" .. L["PPN_INFO_ABOUT_WEB"] .. ": |cffffffff" .. PersonalPlayerNotes:GetWebsite() }, } @@ -151,13 +156,13 @@ PersonalPlayerNotes.options = { Settings = { type = "group", order = 1, - name = L["SHITLIST_SETTINGS_TITLE"], + name = L["PPN_SETTINGS_TITLE"], inline = true, childGroups = "tab", handler = PersonalPlayerNotes, args = { minimap = { - name = L["SHITLIST_SETTINGS_MINIMAP"], + name = L["PPN_SETTINGS_MINIMAP"], order = 1, type = "group", inline = true, @@ -165,8 +170,8 @@ PersonalPlayerNotes.options = { minimapToggle = { type = "toggle", order = 0, - name = L["SHITLIST_SETTINGS_MINIMAP_ICON"], - desc = L["SHITLIST_SETTINGS_MINIMAP_ICON_DESC"], + name = L["PPN_SETTINGS_MINIMAP_ICON"], + desc = L["PPN_SETTINGS_MINIMAP_ICON_DESC"], get = function(info) return PersonalPlayerNotes.db.profile.minimap.hide; end, @@ -178,8 +183,8 @@ PersonalPlayerNotes.options = { minimapPos = { type = "range", order = 1, - name = L["SHITLIST_SETTINGS_MINIMAP_POS"], - desc = L["SHITLIST_SETTINGS_MINIMAP_POS_DESC"], + name = L["PPN_SETTINGS_MINIMAP_POS"], + desc = L["PPN_SETTINGS_MINIMAP_POS_DESC"], width = 1.5, get = function(info) return PersonalPlayerNotes.db.profile.minimap.minimapPos; @@ -195,7 +200,7 @@ PersonalPlayerNotes.options = { }, }, alert = { - name = L["SHITLIST_SETTINGS_ALERT"], + name = L["PPN_SETTINGS_ALERT"], order = 3, type = "group", inline = true, @@ -206,20 +211,20 @@ PersonalPlayerNotes.options = { description = { type = "description", order = 0, - name = L["SHITLIST_SETTINGS_ALERT_DESC"] + name = L["PPN_SETTINGS_ALERT_DESC"] }, enabled = { type = "toggle", order = 1, - name = L["SHITLIST_SETTINGS_ALERT_ENABLED"], - desc = L["SHITLIST_SETTINGS_ALERT_ENABLED_DESC"], + name = L["PPN_SETTINGS_ALERT_ENABLED"], + desc = L["PPN_SETTINGS_ALERT_ENABLED_DESC"], width = 0.5 }, sounds = { type = "select", order = 2, - name = L["SHITLIST_SETTINGS_ALERT_SOUNDS"], - desc = L["SHITLIST_SETTINGS_ALERT_SOUNDS_DESC"], + name = L["PPN_SETTINGS_ALERT_SOUNDS"], + desc = L["PPN_SETTINGS_ALERT_SOUNDS_DESC"], values = function() return PersonalPlayerNotes.db.profile.alert.sounds end, @@ -233,8 +238,8 @@ PersonalPlayerNotes.options = { min = 1, max = 60, step = 1, - name = L["SHITLIST_SETTINGS_ALERT_DELAY"], - desc = L["SHITLIST_SETTINGS_ALERT_DELAY_DESC"], + name = L["PPN_SETTINGS_ALERT_DELAY"], + desc = L["PPN_SETTINGS_ALERT_DELAY_DESC"], width = 1 } } @@ -244,7 +249,7 @@ PersonalPlayerNotes.options = { Reasons = { type = "group", order = 2, - name = L["SHITLIST_REASONS_TITLE"], + name = L["PPN_REASONS_TITLE"], inline = false, handler = PersonalPlayerNotes, args = { @@ -252,13 +257,13 @@ PersonalPlayerNotes.options = { type = "description", order = 0, width = "full", - name = L["SHITLIST_REASON_DESCRIPTION"] + name = L["PPN_REASON_DESCRIPTION"] }, id = { type = "select", order = 1, width = 1.6, - name = L["SHITLIST_REASONS"], + name = L["PPN_REASONS"], values = function() local _return = {} for key, value in pairs(PersonalPlayerNotes.db.profile.reasons) do @@ -274,10 +279,10 @@ PersonalPlayerNotes.options = { order = 2, width = 1, cmdHidden = true, - name = L["SHITLIST_REASON_REMOVE"], + name = L["PPN_REASON_REMOVE"], confirm = function() - return L["SHITLIST_REASON_REMOVE_CONFIRMATION"] .. - PersonalPlayerNotes.db.profile.reason.reason .. "|cffffffff?"; + return L["PPN_REASON_REMOVE_CONFIRMATION"] .. + PersonalPlayerNotes.db.profile.reason.reason .. "|cffffffff?"; end, func = "RemoveReason", disabled = function() @@ -290,7 +295,7 @@ PersonalPlayerNotes.options = { reason = { type = "input", order = 3, - name = L["SHITLIST_REASON"], + name = L["PPN_REASON"], width = 2.6, get = "GetReason", set = "SetReason", @@ -299,7 +304,7 @@ PersonalPlayerNotes.options = { type = "color", order = 4, width = 1.5, - name = L["SHITLIST_REASON_COLOR"], + name = L["PPN_REASON_COLOR"], hasAlpha = false, get = "GetReasonColor", set = "SetReasonColor", @@ -308,8 +313,8 @@ PersonalPlayerNotes.options = { type = "toggle", order = 5, width = 1, - name = L["SHITLIST_REASON_ALERT_ENABLED"], - desc = L["SHITLIST_REASON_ALERT_ENABLED_DESC"], + name = L["PPN_REASON_ALERT_ENABLED"], + desc = L["PPN_REASON_ALERT_ENABLED_DESC"], get = "GetReasonAlert", set = "SetReasonAlert", }, @@ -318,7 +323,7 @@ PersonalPlayerNotes.options = { ListedPlayers = { type = "group", order = 3, - name = L["SHITLIST_LISTED_PLAYERS_TITLE"], + name = L["PPN_LISTED_PLAYERS_TITLE"], inline = true, handler = PersonalPlayerNotes, args = { @@ -326,7 +331,7 @@ PersonalPlayerNotes.options = { type = "select", order = 1, width = 1.6, - name = L["SHITLIST_LISTED_PLAYERS"], + name = L["PPN_LISTED_PLAYERS"], values = function() local _return = {} for key, value in pairs(PersonalPlayerNotes:GetListedPlayers()) do @@ -342,9 +347,9 @@ PersonalPlayerNotes.options = { order = 2, width = 1, cmdHidden = true, - name = L["SHITLIST_LISTED_PLAYER_REMOVE"], + name = L["PPN_LISTED_PLAYER_REMOVE"], confirm = function() - return L["SHITLIST_LISTED_PLAYER_REMOVE_CONFIRMATION"] .. + return L["PPN_LISTED_PLAYER_REMOVE_CONFIRMATION"] .. PersonalPlayerNotes.db.profile.listedPlayer.name .. "-" .. PersonalPlayerNotes.db.profile.listedPlayer.realm .. "|cffffffff?"; end, @@ -353,7 +358,7 @@ PersonalPlayerNotes.options = { name = { type = "input", order = 3, - name = L["SHITLIST_LISTED_PLAYER_NAME"], + name = L["PPN_LISTED_PLAYER_NAME"], width = 1.25, get = "GetListedPlayerName", set = "SetListedPlayerName", @@ -361,7 +366,7 @@ PersonalPlayerNotes.options = { realm = { type = "input", order = 4, - name = L["SHITLIST_LISTED_PLAYER_REALM"], + name = L["PPN_LISTED_PLAYER_REALM"], width = 1.25, get = "GetListedPlayerRealm", set = "SetListedPlayerRealm", @@ -370,7 +375,7 @@ PersonalPlayerNotes.options = { type = "select", order = 5, width = 2.6, - name = L["SHITLIST_LISTED_PLAYER_REASON"], + name = L["PPN_LISTED_PLAYER_REASON"], values = function() local _return = {} for key, value in pairs(PersonalPlayerNotes:GetReasons()) do @@ -384,7 +389,7 @@ PersonalPlayerNotes.options = { description = { type = "input", order = 6, - name = L["SHITLIST_LISTED_PLAYER_DESCRIPTION"], + name = L["PPN_LISTED_PLAYER_DESCRIPTION"], width = 2.6, get = "GetListedPlayerSelectedDescription", set = "SetListedPlayerSelectedDescription", @@ -393,7 +398,7 @@ PersonalPlayerNotes.options = { type = "color", order = 7, width = 1.5, - name = L["SHITLIST_LISTED_PLAYER_COLOR"], + name = L["PPN_LISTED_PLAYER_COLOR"], hasAlpha = false, get = "GetListedPlayerColor", set = "SetListedPlayerColor", @@ -402,13 +407,13 @@ PersonalPlayerNotes.options = { type = "toggle", order = 8, width = 1, - name = L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED"], - desc = L["SHITLIST_LISTED_PLAYER_ALERT_ENABLED_DESC"], + name = L["PPN_LISTED_PLAYER_ALERT_ENABLED"], + desc = L["PPN_LISTED_PLAYER_ALERT_ENABLED_DESC"], get = "GetListedPlayerAlert", set = "SetListedPlayerAlert", disabled = function() return not PersonalPlayerNotes.db.profile.reasons - [PersonalPlayerNotes.db.profile.listedPlayer.reason].alert + [PersonalPlayerNotes.db.profile.listedPlayer.reason].alert end, }, } diff --git a/PersonalPlayerNotesUtils.lua b/PersonalPlayerNotesUtils.lua index 7335d03..3386f01 100644 --- a/PersonalPlayerNotesUtils.lua +++ b/PersonalPlayerNotesUtils.lua @@ -2,35 +2,35 @@ local personalPlayerNotes = ... local L = LibStub("AceLocale-3.0"):GetLocale(personalPlayerNotes, true) function PersonalPlayerNotes:GetVersion() - return tostring(GetAddOnMetadata(personalPlayerNotes, "Version")) or L["SHITLIST_NA"]; + return tostring(C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Version")) or L["PPN_NA"]; end function PersonalPlayerNotes:GetTitle() - return GetAddOnMetadata(personalPlayerNotes, "Title") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Title") or L["PPN_NA"]; end function PersonalPlayerNotes:GetAuthor() - return GetAddOnMetadata(personalPlayerNotes, "Author") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Author") or L["PPN_NA"]; end function PersonalPlayerNotes:GetNotes() - return GetAddOnMetadata(personalPlayerNotes, "Notes") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Notes") or L["PPN_NA"]; end function PersonalPlayerNotes:GetLocalizations() - return GetAddOnMetadata(personalPlayerNotes, "X-Localizations") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-Localizations") or L["PPN_NA"]; end function PersonalPlayerNotes:GetCategory() - return GetAddOnMetadata(personalPlayerNotes, "X-Category") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-Category") or L["PPN_NA"]; end function PersonalPlayerNotes:GetWebsite() - return GetAddOnMetadata(personalPlayerNotes, "X-Website") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-Website") or L["PPN_NA"]; end function PersonalPlayerNotes:GetLicense() - return GetAddOnMetadata(personalPlayerNotes, "X-License") or L["SHITLIST_NA"]; + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-License") or L["PPN_NA"]; end function PersonalPlayerNotes:AceGUIDefaults() @@ -46,15 +46,13 @@ end function PersonalPlayerNotes:Print(...) if (self.db and self.db.profile.debug) then - return print(L["SHITLIST_DEBUG"], ...) + return print(L["PPN_DEBUG"], ...) end - return print(L["SHITLIST_PRINT"], ...) + return print(L["PPN_PRINT"], ...) end ---@debug@ function PersonalPlayerNotes:PrintDebug(...) if (self.db and self.db.profile.debug) then self:Print(...) end end ---@end-debug@ diff --git a/changelog.txt b/changelog.txt index 5748f26..ee1f7af 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,15 +1,2 @@ -v2.0.4 - Minor fix to the dropdown menu added in 2.0.2. - Added Wrath toc file. - -v2.0.3 - Updated Retail to use the new Blizzard Menu system. - -v2.0.2 - Can now add/edit players thru chat window and guild page. - -v2.0.1 - Removed unused dependencies. - -v2.0.0 - Complete rewrite of the addon. +v1.0.0 + Re-released with a new name and minor code base changes to not violate curse forge ToS. \ No newline at end of file From e82d1415bbc8a056b7550bebd243cc227986c752 Mon Sep 17 00:00:00 2001 From: JasonDev Date: Tue, 20 Aug 2024 16:58:49 +0800 Subject: [PATCH 09/13] zhCN localization text updates --- Locales/zhCN.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index 307f46f..8847d3b 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -33,10 +33,10 @@ L["PPN_CONFIG_REFRESH"] = "正在重新加载配置..."; L["PPN_CONFIG_CHECK_OLD_DATA"] = "正在检查历史数据..."; L["PPN_CONFIG_ADDED_OLD_DATA"] = "已添加历史数据:"; L["PPN_CONFIG_DUPLICATE_DATA"] = "找到重复数据:"; -L["PPN_CONFIG_MIGRATE"] = "Do you want to migrate profiles from Shitlist?"; -L["PPN_CONFIG_MIGRATE_YES"] = "Yes"; -L["PPN_CONFIG_MIGRATE_NO"] = "No"; -L["PPN_CONFIG_MIGRATE_DONE"] = "Profiles from Shitlist has been migrated."; +L["PPN_CONFIG_MIGRATE"] = "ShitList插件现已更名为Personal Player Notes. 你想把原Shitlist插件的配置文件迁移至Personal Player Notes吗?"; +L["PPN_CONFIG_MIGRATE_YES"] = "是"; +L["PPN_CONFIG_MIGRATE_NO"] = "否"; +L["PPN_CONFIG_MIGRATE_DONE"] = "Shitlist配置文件已迁移至Personal Player Notes."; L["PPN_INFO_COMMANDS_TITLE"] = "命令"; L["PPN_INFO_COMMANDS_DESC"] = "所有可用的斜杠命令"; @@ -79,7 +79,7 @@ L["PPN_REASON_REMOVE_CONFIRMATION"] = "您确定要删除:\n|cffffd700"; L["PPN_REASON_COLOR"] = "选择颜色(此分组在鼠标提示中的颜色)"; L["PPN_REASON_ALERT_ENABLED"] = "启用分组提示音" L["PPN_REASON_ALERT_ENABLED_DESC"] = "当前分组提示音效开关. 启用后, 当发现此分组内的玩家时, 将播放配置的提示音." -L["PPN_DEFAULT_REASON"] = "None"; +L["PPN_DEFAULT_REASON"] = "默认"; L["PPN_LISTED_PLAYERS_TITLE"] = "关注名单 - 已关注的玩家"; L["PPN_LISTED_PLAYERS"] = "已关注的玩家"; @@ -96,7 +96,7 @@ L["PPN_LISTED_PLAYER_ALERT_ENABLED_DESC"] = "为该玩家启用或禁用提示音. 如果该玩家所在的分组分类已禁用了提示音, 则不能开启." L["PPN_LISTED_PLAYERS_EXAMPLE_NAME"] = "变异骷髅"; L["PPN_LISTED_PLAYERS_EXAMPLE_REALM"] = "灰烬使者"; -L["PPN_LISTED_PLAYERS_EXAMPLE_DESC"] = "None"; +L["PPN_LISTED_PLAYERS_EXAMPLE_DESC"] = "关注名单汉化先行者!RESPECT!"; L["PPN_POPUP_ADD"] = "添加到关注名单"; L["PPN_POPUP_EDIT"] = "编辑关注信息"; From 44eafd58cf108204c19c65db7550fbc7fac9d659 Mon Sep 17 00:00:00 2001 From: Limmek Date: Tue, 20 Aug 2024 15:19:56 +0200 Subject: [PATCH 10/13] Create tag_and_release.yml --- .github/workflows/tag_and_release.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/tag_and_release.yml diff --git a/.github/workflows/tag_and_release.yml b/.github/workflows/tag_and_release.yml new file mode 100644 index 0000000..1ea5742 --- /dev/null +++ b/.github/workflows/tag_and_release.yml @@ -0,0 +1,30 @@ +name: Auto Release + +on: + workflow_dispatch: + pull_request: + types: [closed] + +jobs: + build: + runs-on: ubuntu-latest + if: github.event.pull_request.merged && github.event.pull_request.base.ref == 'master' + steps: + - uses: actions/checkout@v3 + + - name: Tag and prepare release + id: tag_and_prepare_release + uses: K-Phoen/semver-release-action@master + with: + release_branch: ${{ github.event.pull_request.base.ref }} + release_strategy: tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload release notes + if: steps.tag_and_prepare_release.outputs.tag + uses: Roang-zero1/github-create-release-action@v3 + with: + created_tag: ${{ steps.tag_and_prepare_release.outputs.tag }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3e7909e945f8dd871882be41e784f5e340ca2a15 Mon Sep 17 00:00:00 2001 From: Limmek Date: Tue, 20 Aug 2024 15:26:04 +0200 Subject: [PATCH 11/13] Update build.yml --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ba974b..c357a55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,8 @@ name: Package and release on: workflow_dispatch: - push: - tags: - - "**" + workflow_run: + workflows: ['Auto Release'] jobs: run: From c09d66c8e9d9920759acf5572ec43ac6d870b1b3 Mon Sep 17 00:00:00 2001 From: Limmek Date: Tue, 20 Aug 2024 15:32:00 +0200 Subject: [PATCH 12/13] Update tag_and_release.yml --- .github/workflows/tag_and_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag_and_release.yml b/.github/workflows/tag_and_release.yml index 1ea5742..c8618bb 100644 --- a/.github/workflows/tag_and_release.yml +++ b/.github/workflows/tag_and_release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.merged && github.event.pull_request.base.ref == 'master' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Tag and prepare release id: tag_and_prepare_release From acad6f19fe1b7951b71dd4bb4b93e1e161192d27 Mon Sep 17 00:00:00 2001 From: Limmek Date: Tue, 20 Aug 2024 15:41:05 +0200 Subject: [PATCH 13/13] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 3bf3c32..e9c65c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -2,6 +2,8 @@ name: Bug Report description: File a bug report title: "🐛 " labels: ["🐛 Bug"] +assignees: + - Limmek body: - type: checkboxes attributes: