diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index b3d2bf0..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: @@ -26,15 +28,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/.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: diff --git a/.github/workflows/tag_and_release.yml b/.github/workflows/tag_and_release.yml new file mode 100644 index 0000000..c8618bb --- /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@v4 + + - 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 }} 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/.pkgmeta b/.pkgmeta index 09bf7d6..6144a4c 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -1,4 +1,4 @@ -package-as: Shitlist +package-as: PersonalPlayerNotes manual-changelog: filename: changelog.txt @@ -10,11 +10,11 @@ enable-toc-creation: no ignore: - .gitignore + - .gitkeep - .luacheckrc - .vscode - .github - .pkgmeta - - Libs/libs.txt required-dependencies: diff --git a/.vscode/settings.json b/.vscode/settings.json index 9c5b188..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,107 +24,31 @@ "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", - "GetItemInfo", + "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" + "ShitlistDB" + ], + "Lua.runtime.builtin": { + "basic": "disable", + "debug": "disable", + "io": "disable", + "math": "disable", + "os": "disable", + "package": "disable", + "string": "disable", + "table": "disable", + "utf8": "disable" + }, + "Lua.workspace.library": [ + "~\\.vscode\\extensions\\ketho.wow-api-0.17.4\\Annotations" ], } \ No newline at end of file diff --git a/Images/icon.png b/Images/icon.png new file mode 100644 index 0000000..d045836 Binary files /dev/null and b/Images/icon.png differ diff --git a/Images/shitlist.png b/Images/shitlist.png deleted file mode 100644 index 159ae5c..0000000 Binary files a/Images/shitlist.png and /dev/null differ diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 0521312..4ae82e9 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,124 +9,101 @@ 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_NA"] = "N/A"; - -L["SHITLIST_DISABLE"] = "Unloading..."; - -L["SHITLIST_MENU_TITLE"] = "Shitlist"; -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_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"] = "Shitlist - 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_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."; -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"] = "Shitlist - 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"] = "Shitlist - 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 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." -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 bd1b213..8847d3b 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 @@ -10,124 +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_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"] = "配置当发现已关注的玩家时播放的提示音"; -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"] = "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"] = "所有可用的斜杠命令"; +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"] = "默认"; + +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_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 打开全局设置." -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"] = "关注名单汉化先行者!RESPECT!"; + +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 new file mode 100644 index 0000000..243bddb --- /dev/null +++ b/PersonalPlayerNotes.lua @@ -0,0 +1,446 @@ +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(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 false; +PersonalPlayerNotes.IsRetail = IS_RETAIL; + +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("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("PersonalPlayerNotesSettings Info", self.options.Info) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Info", 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, { "ppnr", "ppnreasons" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Reasons", L["PPN_MENU_REASONS"], personalPlayerNotes) + + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Listed_Players", self.options.ListedPlayers, + { "ppnp", "ppnplayers" }) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Listed_Players", L["PPN_MENU_LISTED_PLAYERS"], + personalPlayerNotes) + + local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db) + AceConfig:RegisterOptionsTable("PersonalPlayerNotesSettings Profiles", profiles) + AceConfigDialog:AddToBlizOptions("PersonalPlayerNotesSettings Profiles", L["PPN_MENU_PROFILES"], personalPlayerNotes) + + LibDBIcon:Register(personalPlayerNotes, self:MiniMapIcon(), self.db.profile.minimap) + + self:RegisterChatCommand("ppn", function() + Settings.OpenToCategory(personalPlayerNotes) + end) + self:RegisterChatCommand("ppnm", "ToggleMiniMapIcon") + self:RegisterChatCommand("ppnminimap", "ToggleMiniMapIcon") + self:RegisterChatCommand("ppndebug", "ToggleDebug") + + local loaded, reason = C_AddOns.LoadAddOn("Shitlist") + if loaded then + self:GetOldConfigData() + end + self:LoadConfig() +end + +function PersonalPlayerNotes:OnEnable() + 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 + -- 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() + -- 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 + GameTooltip:HookScript("OnTooltipSetUnit", self.GameTooltip) + end + self:Print(L["PPN_CONFIG_LOADED"]) +end + +function PersonalPlayerNotes:OnDisable() + self:Print(L["PPN_DISABLE"]) +end + +function PersonalPlayerNotes:LoadConfig() + self.db.profile.alert.last = {} + + if self.db.profile.minimap.hide then + LibDBIcon:Hide(personalPlayerNotes) + else + LibDBIcon:Show(personalPlayerNotes) + end + + 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 + +function PersonalPlayerNotes:GetOldConfigData() + local reasons = self:GetReasons() + 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["PPN_CONFIG_CHECK_OLD_DATA"]) + + local oldListedPlayers = ShitlistDB.ListedPlayers + local newPlayers = {} + + -- 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 + -- 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, + } + + self:Print(L["PPN_CONFIG_ADDED_OLD_DATA"], name .. "-" .. realm) + else + self:Print(L["PPN_CONFIG_DUPLICATE_DATA"], name .. "-" .. realm) + end + end + end + + -- remove the old listed players from the database + ShitlistDB.ListedPlayers = nil + ShitlistDB.Reasons = nil + end + end + + -- Move old shitlist profiles data to new Personal Player Notes database + if ShitlistDB and ShitlistDB.profiles then + self:Print(L["PPN_CONFIG_MIGRATE_OLD_DATA"]) + StaticPopupDialogs["MIGRATE_PROFILES"] = { + 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["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") + C_AddOns.DisableAddOn("Shitlist") + C_UI.Reload() + end, + timeout = 0, + whileDead = true, + hideOnEscape = true, + preferredIndex = 3, + } + StaticPopup_Show("MIGRATE_PROFILES") + end +end + +function PersonalPlayerNotes:DropDownMenuInitialize() + local DropDownMenu = function(ownerRegion, rootDescription, contextData) + -- 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 = PersonalPlayerNotes:GetListedPlayer(name, realm) + if (not listedPlayer) then + rootDescription:CreateDivider() + 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 + 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 = PersonalPlayerNotes:AceGUIDefaults() + 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["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 + 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 = PersonalPlayerNotes:AceGUIDefaults() + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") + end) + end + end + Menu.ModifyMenu("MENU_UNIT_PLAYER", function(...) DropDownMenu(...) end) + Menu.ModifyMenu("MENU_UNIT_ENEMY_PLAYER", function(...) DropDownMenu(...) end) + Menu.ModifyMenu("MENU_UNIT_FRIEND", function(...) DropDownMenu(...) end) +end + +-- Classic Deprecated +function PersonalPlayerNotes:UnitPopup_ShowMenu(target, unit, menuList) + PersonalPlayerNotes:PrintDebug("Unit: ", unit, ", Target: ", target) + -- verify the target + if target == "SELF" or target == "FRIEND" or target == "COMMUNITIES_GUILD_MEMBER" then + return + end + -- verify the unit + if unit == nil or not UnitIsPlayer(unit) then + return + end + -- retrieve name and realm from wow api + 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 = PersonalPlayerNotes:GetListedPlayer(name, realm) + + PersonalPlayerNotes:PrintDebug("Name: ", name, ", Realm: ", realm) + + -- Check if this is the root level of the dropdown menu + if UIDROPDOWNMENU_MENU_LEVEL == 1 then + if (listedPlayer) then + UIDropDownMenu_AddButton({ + text = personalPlayerNotes, + notCheckable = true, + hasArrow = true, + keepShownOnClick = true, + }, UIDROPDOWNMENU_MENU_LEVEL) + else + UIDropDownMenu_AddButton({ + text = L["PPN_POPUP_ADD"], + notCheckable = true, + icon = PersonalPlayerNotes.db.profile.icon, + value = { name, realm }, + func = 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 + 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 = PersonalPlayerNotes:AceGUIDefaults() + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") + end, + }, UIDROPDOWNMENU_MENU_LEVEL) + end + elseif UIDROPDOWNMENU_MENU_VALUE == personalPlayerNotes then + -- Add the submenu + local menuItem = UIDropDownMenu_CreateInfo() + menuItem.text = personalPlayerNotes + menuItem.notCheckable = true + menuItem.keepShownOnClick = true + menuItem.hasArrow = false + menuItem.isTitle = true + menuItem.disabled = true + menuItem.icon = PersonalPlayerNotes.db.profile.icon + UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) + + menuItem = UIDropDownMenu_CreateInfo() + menuItem.text = L["PPN_POPUP_EDIT"] + menuItem.notCheckable = true + menuItem.hasArrow = false + menuItem.value = listedPlayer + menuItem.func = function() + if (listedPlayer) then + 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 = PersonalPlayerNotes:AceGUIDefaults() + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") + end + end + UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) + end +end + +function PersonalPlayerNotes:GameTooltip() + local _name, unit = self:GetUnit() + if not (unit and UnitIsPlayer(unit)) then return end + + local name, realm = UnitFullName(unit) + if (_name ~= name) then return end + + if (realm == nil) then realm = GetRealmName() end + + local listedPlayer = PersonalPlayerNotes:GetListedPlayer(name, realm) + if (not listedPlayer) then return end + + local reason = PersonalPlayerNotes:GetReasons()[listedPlayer.reason] + local _reason = reason + local _listedPlayer = listedPlayer + + PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Playername:", name, "Realm:", realm, "Reason:", + _reason + .reason, + "Note:", _listedPlayer.description) + + -- Tooltip + if not (_reason.reason == "None" and _listedPlayer.description == "") then + self:AddLine("\n") + 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) + end + + -- Alert + local time = time() + 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 + PersonalPlayerNotes:ScheduleTimer("AlertDelayTimer", alert.delay, name) + PersonalPlayerNotes:PlayAlertSoundEffect() + PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Sound effect disabled for player", name, "for", + alert.delay, + "seconds.") + end + end +end + +function PersonalPlayerNotes:AlertDelayTimer(name) + -- Called within ScheduleTimer and fires when timer ends. + PersonalPlayerNotes:PrintDebug("|cffff0000|cffffffff Sound effect is now enabled for player", name) + PersonalPlayerNotes.db.profile.alert.last[name] = nil +end + +function PersonalPlayerNotes:MiniMapIcon() + -- Create minimap launcher + -- https://github.com/tekkub/libdatabroker-1-1/wiki/How-to-provide-a-dataobject + return LibDataBroker:NewDataObject(personalPlayerNotes, { + type = "launcher", + 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) + elseif button == "LeftButton" then + local AceGUI = PersonalPlayerNotes:AceGUIDefaults() + if IsShiftKeyDown() then + AceGUI:SetTitle(L["PPN_REASONS_TITLE"]) + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Reasons", 500, 200) + AceConfigDialog:Open("PersonalPlayerNotesSettings Reasons") + elseif IsControlKeyDown() then + AceGUI:SetTitle(L["PPN_LISTED_PLAYERS_TITLE"]) + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Listed_Players", 500, 300) + AceConfigDialog:Open("PersonalPlayerNotesSettings Listed_Players") + else + AceGUI:SetTitle(L["PPN_SETTINGS_TITLE"]) + AceConfigDialog:SetDefaultSize("PersonalPlayerNotesSettings Options", 500, 350) + AceConfigDialog:Open("PersonalPlayerNotesSettings Options") + end + end + end, + OnTooltipShow = function(tooltip) + tooltip:AddDoubleLine( + "|T" .. PersonalPlayerNotes.db.profile.icon .. ":0|t " .. L["PPN_MINIMAP_TOOLTIP_TITLE"], + PersonalPlayerNotes:GetVersion()) + tooltip:AddLine("\n") + 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 + +function PersonalPlayerNotes:ToggleMiniMapIcon() + self.db.profile.minimap.hide = not self.db.profile.minimap.hide + self:LoadConfig() +end + +function PersonalPlayerNotes:ToggleDebug() + self.db.profile.debug = not self.db.profile.debug + self:LoadConfig() +end diff --git a/PersonalPlayerNotes.toc b/PersonalPlayerNotes.toc new file mode 100644 index 0000000..69eb2c1 --- /dev/null +++ b/PersonalPlayerNotes.toc @@ -0,0 +1,27 @@ +## 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. +## 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 +## SavedVariables: PersonalPlayerNotesDB +## 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/PersonalPlayerNotes +## X-License: MIT +## IconTexture: Interface\AddOns\PersonalPlayerNotes\Images\icon.png + +embeds.xml + +Locales\Locales.xml + +PersonalPlayerNotes.lua +PersonalPlayerNotesUtils.lua +PersonalPlayerNotesConfig.lua diff --git a/ShitlistConfig.lua b/PersonalPlayerNotesConfig.lua similarity index 58% rename from ShitlistConfig.lua rename to PersonalPlayerNotesConfig.lua index 7b4ca54..875f8d6 100644 --- a/ShitlistConfig.lua +++ b/PersonalPlayerNotesConfig.lua @@ -1,12 +1,11 @@ -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 }, alert = { delay = 10, enabled = true, @@ -16,29 +15,26 @@ Shitlist.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 = 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, }, } @@ -46,11 +42,11 @@ Shitlist.defaults = { } -- https://www.wowace.com/projects/ace3/pages/ace-config-3-0-options-tables -Shitlist.options = { +PersonalPlayerNotes.options = { Info = { type = "group", order = 0, - name = L["SHITLIST_MENU_TITLE"], + name = L["PPN_MENU_TITLE"], inline = true, cmdHidden = true, args = { @@ -58,43 +54,49 @@ 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"], - 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, @@ -104,48 +106,48 @@ Shitlist.options = { order = 0, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_VERSION"] .. - ": |cffff8c00" .. Shitlist:GetVersion() + name = "|cffffd700" .. L["PPN_INFO_ABOUT_VERSION"] .. + ": |cffff8c00" .. PersonalPlayerNotes:GetVersion() }, author = { type = "description", order = 1, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_AUTHOR"] .. - ": |cffffffff" .. Shitlist:GetAuthor() + name = "|cffffd700" .. L["PPN_INFO_ABOUT_AUTHOR"] .. + ": |cffffffff" .. PersonalPlayerNotes:GetAuthor() }, category = { type = "description", order = 2, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_CATEGORY"] .. - ": |cffffffff" .. Shitlist:GetCategory() + name = "|cffffd700" .. L["PPN_INFO_ABOUT_CATEGORY"] .. + ": |cffffffff" .. PersonalPlayerNotes:GetCategory() }, localizations = { type = "description", order = 3, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_LOCALIZATION"] .. - ": |cffffffff" .. Shitlist:GetLocalizations() + name = "|cffffd700" .. L["PPN_INFO_ABOUT_LOCALIZATION"] .. + ": |cffffffff" .. PersonalPlayerNotes:GetLocalizations() }, license = { type = "description", order = 4, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_LICENSE"] .. - ": |cffffffff" .. Shitlist:GetLicense() + name = "|cffffd700" .. L["PPN_INFO_ABOUT_LICENSE"] .. + ": |cffffffff" .. PersonalPlayerNotes:GetLicense() }, website = { type = "description", order = 5, width = "full", fontSize = "medium", - name = "|cffffd700" .. L["SHITLIST_INFO_ABOUT_WEB"] .. - ": |cffffffff" .. Shitlist:GetWebsite() + name = "|cffffd700" .. L["PPN_INFO_ABOUT_WEB"] .. + ": |cffffffff" .. PersonalPlayerNotes:GetWebsite() }, } } @@ -154,13 +156,13 @@ Shitlist.options = { Settings = { type = "group", order = 1, - name = L["SHITLIST_SETTINGS_TITLE"], + name = L["PPN_SETTINGS_TITLE"], inline = true, childGroups = "tab", - handler = Shitlist, + handler = PersonalPlayerNotes, args = { minimap = { - name = L["SHITLIST_SETTINGS_MINIMAP"], + name = L["PPN_SETTINGS_MINIMAP"], order = 1, type = "group", inline = true, @@ -168,28 +170,28 @@ Shitlist.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 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 = { 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 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, @@ -197,52 +199,8 @@ 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"], + name = L["PPN_SETTINGS_ALERT"], order = 3, type = "group", inline = true, @@ -253,22 +211,22 @@ Shitlist.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 Shitlist.db.profile.alert.sounds + return PersonalPlayerNotes.db.profile.alert.sounds end, width = 1, set = "SetAlertSoundEffect", @@ -280,8 +238,8 @@ Shitlist.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 } } @@ -291,43 +249,44 @@ Shitlist.options = { Reasons = { type = "group", order = 2, - name = L["SHITLIST_REASONS_TITLE"], + name = L["PPN_REASONS_TITLE"], inline = false, - handler = Shitlist, + handler = PersonalPlayerNotes, args = { description = { 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(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", order = 2, width = 1, cmdHidden = true, - name = L["SHITLIST_REASON_REMOVE"], + name = L["PPN_REASON_REMOVE"], confirm = function() - return L["SHITLIST_REASON_REMOVE_CONFIRMATION"] .. Shitlist.db.profile.reason.reason .. "|cffffffff?"; + return L["PPN_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 @@ -336,7 +295,7 @@ Shitlist.options = { reason = { type = "input", order = 3, - name = L["SHITLIST_REASON"], + name = L["PPN_REASON"], width = 2.6, get = "GetReason", set = "SetReason", @@ -345,7 +304,7 @@ Shitlist.options = { type = "color", order = 4, width = 1.5, - name = L["SHITLIST_REASON_COLOR"], + name = L["PPN_REASON_COLOR"], hasAlpha = false, get = "GetReasonColor", set = "SetReasonColor", @@ -354,8 +313,8 @@ Shitlist.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", }, @@ -364,18 +323,18 @@ Shitlist.options = { ListedPlayers = { type = "group", order = 3, - name = L["SHITLIST_LISTED_PLAYERS_TITLE"], + name = L["PPN_LISTED_PLAYERS_TITLE"], inline = true, - handler = Shitlist, + handler = PersonalPlayerNotes, args = { id = { 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(Shitlist:GetListedPlayers()) do + for key, value in pairs(PersonalPlayerNotes:GetListedPlayers()) do _return[key] = value.name .. "-" .. value.realm end return _return @@ -388,18 +347,18 @@ Shitlist.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"] .. - Shitlist.db.profile.listedPlayer.name .. - "-" .. Shitlist.db.profile.listedPlayer.realm .. "|cffffffff?"; + return L["PPN_LISTED_PLAYER_REMOVE_CONFIRMATION"] .. + PersonalPlayerNotes.db.profile.listedPlayer.name .. + "-" .. PersonalPlayerNotes.db.profile.listedPlayer.realm .. "|cffffffff?"; end, func = "RemoveListedPlayer", }, name = { type = "input", order = 3, - name = L["SHITLIST_LISTED_PLAYER_NAME"], + name = L["PPN_LISTED_PLAYER_NAME"], width = 1.25, get = "GetListedPlayerName", set = "SetListedPlayerName", @@ -407,7 +366,7 @@ Shitlist.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", @@ -416,10 +375,10 @@ Shitlist.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(Shitlist:GetReasons()) do + for key, value in pairs(PersonalPlayerNotes:GetReasons()) do _return[key] = value.reason end return _return @@ -430,7 +389,7 @@ Shitlist.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", @@ -439,7 +398,7 @@ Shitlist.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", @@ -448,75 +407,67 @@ Shitlist.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 Shitlist.db.profile.reasons[Shitlist.db.profile.listedPlayer.reason].alert + return not PersonalPlayerNotes.db.profile.reasons + [PersonalPlayerNotes.db.profile.listedPlayer.reason].alert end, }, } } } +--#region Sound ---#region Announcement - -function Shitlist:GetAnnouncement(info) - return self.db.profile.announcement[info[#info]] +function PersonalPlayerNotes:GetAlert(info) + return self.db.profile.alert[info[#info]] end -function Shitlist:SetAnnouncement(info, value) - self.db.profile.announcement[info[#info]] = value +function PersonalPlayerNotes:SetAlert(info, value) + self.db.profile.alert[info[#info]] = value end ---#endregion - - ---#region Sound +function PersonalPlayerNotes:GetAlertSoundEffect(info) + return self.db.profile.alert.sound +end -function Shitlist:GetAlert(info) - return self.db.profile.alert[info[#info]] +function PersonalPlayerNotes:SetAlertSoundEffect(info, value) + self:PlayAlertSoundEffect(value) + self.db.profile.alert.sound = value end -function Shitlist:SetAlert(info, value) - self.db.profile.alert[info[#info]] = value +function PersonalPlayerNotes:PlayAlertSoundEffect(effect, channel) + PlaySoundFile( + "Interface\\AddOns\\" .. + personalPlayerNotes .. + "\\Sounds\\" .. PersonalPlayerNotes.db.profile.alert.sounds[effect or self:GetAlertSoundEffect()] .. ".ogg", + channel or "master" + ) end --#endregion - --#region Reasons --[[ 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 @@ -530,39 +481,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 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: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 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 @@ -570,18 +529,19 @@ end --#endregion - --#region Listed Players --[[ - Returns all listed players + Returns all listed players. ]] --- -function Shitlist:GetListedPlayers() +function PersonalPlayerNotes:GetListedPlayers() return self.db.profile.listedPlayers end -function Shitlist:GetListedPlayer(name, realm) +--[[ + Return listed player data by name and 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] @@ -590,11 +550,17 @@ function Shitlist:GetListedPlayer(name, realm) return nil end -function Shitlist:GetListedPlayerSelected(info) +--[[ + Return the current selected player data. +]] +function PersonalPlayerNotes:GetListedPlayerSelected(info) return self.db.profile.listedPlayer[info[#info]] end -function Shitlist:SetListedPlayerSelected(info, value) +--[[ + Set player data by current selected player data. +]] +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 @@ -608,14 +574,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 @@ -627,14 +593,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 @@ -644,15 +610,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 @@ -663,37 +629,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, @@ -708,31 +674,14 @@ 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 --#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 diff --git a/PersonalPlayerNotesUtils.lua b/PersonalPlayerNotesUtils.lua new file mode 100644 index 0000000..3386f01 --- /dev/null +++ b/PersonalPlayerNotesUtils.lua @@ -0,0 +1,58 @@ +local personalPlayerNotes = ... +local L = LibStub("AceLocale-3.0"):GetLocale(personalPlayerNotes, true) + +function PersonalPlayerNotes:GetVersion() + return tostring(C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Version")) or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetTitle() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Title") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetAuthor() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Author") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetNotes() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "Notes") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetLocalizations() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-Localizations") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetCategory() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-Category") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetWebsite() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-Website") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:GetLicense() + return C_AddOns.GetAddOnMetadata(personalPlayerNotes, "X-License") or L["PPN_NA"]; +end + +function PersonalPlayerNotes:AceGUIDefaults() + local aceGUI = LibStub("AceGUI-3.0"):Create("Frame") + aceGUI:SetCallback("OnClose", function(widget) aceGUI:Release() end) + aceGUI:SetLayout("Fill") + aceGUI:SetStatusText(nil) + aceGUI.statustext:Hide() + aceGUI.statustext:GetParent():Hide() + aceGUI:Hide() + return aceGUI +end + +function PersonalPlayerNotes:Print(...) + if (self.db and self.db.profile.debug) then + return print(L["PPN_DEBUG"], ...) + end + return print(L["PPN_PRINT"], ...) +end + +function PersonalPlayerNotes:PrintDebug(...) + if (self.db and self.db.profile.debug) then + self:Print(...) + end +end 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*).. diff --git a/Shitlist.lua b/Shitlist.lua deleted file mode 100644 index c9cdc17..0000000 --- a/Shitlist.lua +++ /dev/null @@ -1,511 +0,0 @@ -local shitlist = ... -Shitlist = LibStub("AceAddon-3.0"):NewAddon(shitlist, "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 IS_RETAIL = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or nil; -Shitlist.IsRetail = IS_RETAIL; - -function Shitlist: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") - - -- 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("ShitlistSettings Options", self.options.Settings, { "slo" }) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Options", L["SHITLIST_MENU_SETTINGS"], shitlist) - - AceConfig:RegisterOptionsTable("ShitlistSettings Reasons", self.options.Reasons, { "slr" }) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Reasons", L["SHITLIST_MENU_REASONS"], shitlist) - - AceConfig:RegisterOptionsTable("ShitlistSettings Listed_Players", self.options.ListedPlayers, { "slp" }) - AceConfigDialog:AddToBlizOptions("ShitlistSettings Listed_Players", L["SHITLIST_MENU_LISTED_PLAYERS"], shitlist) - - -- 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) - - LibDBIcon:Register(shitlist, self:MiniMapIcon(), self.db.profile.minimap) - - -- https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0 - self:RegisterChatCommand("slm", "ToggleMiniMapIcon") - self:RegisterChatCommand("sldebug", "ToggleDebug") - - self:GetOldConfigData() - self:RefreshConfig() -end - -function Shitlist: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()) - - -- 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() - - TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, self.GameTooltip) - else - 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"]) -end - -function Shitlist:OnDisable() - self:Print(L["SHITLIST_DISABLE"]) -end - -function Shitlist:RefreshConfig() - self.db.profile.alert.last = {} - - if self.db.profile.minimap.hide then - LibDBIcon:Hide(shitlist) - else - LibDBIcon:Show(shitlist) - end - - --@debug@ - self:PrintDebug(L["SHITLIST_CONFIG_REFRESH"]) - self:PrintDebug("Debug:", _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 Shitlist:GetOldConfigData() - 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 - local reasons = self:GetReasons() - local listedPlayers = self:GetListedPlayers() - local newPlayers = {} - - -- 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 - -- 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, - } - - self:Print(L["SHITLIST_CONFIG_ADDED_OLD_DATA"], name .. "-" .. realm) - else - self:Print(L["SHITLIST_CONFIG_DUPLICATE_DATA"], name .. "-" .. realm) - end - end - end - - -- remove the old listed players from the database - _G.ShitlistDB.ListedPlayers = nil - _G.ShitlistDB.Reasons = nil - end -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) - end - if realm == nil then realm = GetRealmName() end - - local listedPlayer = Shitlist:GetListedPlayer(name, realm) - if (not listedPlayer) then - rootDescription:CreateButton(L["SHITLIST_POPUP_ADD"], 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 - - AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings 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 - - AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - 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) - Menu.ModifyMenu("MENU_UNIT_ENEMY_PLAYER", function(...) DropDownMenu(...) end) - Menu.ModifyMenu("MENU_UNIT_FRIEND", function(...) DropDownMenu(...) end) -end - --- Classic Deprecated -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 - end - -- verify the unit - if unit == nil or not UnitIsPlayer(unit) then - return - end - -- retrieve name and realm from wow api - 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) - - --@debug@ - Shitlist: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, - notCheckable = true, - hasArrow = true, - keepShownOnClick = true, - }, UIDROPDOWNMENU_MENU_LEVEL) - else - UIDropDownMenu_AddButton({ - text = L["SHITLIST_POPUP_ADD"], - notCheckable = true, - icon = Shitlist.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 - - AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") - end, - }, UIDROPDOWNMENU_MENU_LEVEL) - end - elseif UIDROPDOWNMENU_MENU_VALUE == shitlist then - -- Add the submenu - local menuItem = UIDropDownMenu_CreateInfo() - menuItem.text = shitlist - menuItem.notCheckable = true - menuItem.keepShownOnClick = true - menuItem.hasArrow = false - menuItem.isTitle = true - menuItem.disabled = true - menuItem.icon = Shitlist.db.profile.icon - UIDropDownMenu_AddButton(menuItem, UIDROPDOWNMENU_MENU_LEVEL) - - menuItem = UIDropDownMenu_CreateInfo() - menuItem.text = L["SHITLIST_POPUP_EDIT"] - menuItem.notCheckable = true - menuItem.hasArrow = false - 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 - - AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") - end - 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 - -function Shitlist:GameTooltip() - local _name, unit = self:GetUnit() - if not (unit and UnitIsPlayer(unit)) then return end - - local name, realm = UnitFullName(unit) - if (_name ~= name) then return end - - if (realm == nil) then realm = GetRealmName() end - - local listedPlayer = Shitlist:GetListedPlayer(name, realm) - if (not listedPlayer) then return end - - local reason = Shitlist:GetReasons()[listedPlayer.reason] - local _reason = reason - local _listedPlayer = listedPlayer - - --@debug@ - Shitlist: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 - self:AddLine("\n") - self:AddDoubleLine(_reason.reason:gsub("None", ""), "|T" .. Shitlist.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) - end - - -- Alert - local time = time() - local alert = Shitlist.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:PlayAlertEffect() - --@debug@ - Shitlist:PrintDebug("|cffff0000|cffffffff Sound effect disabled for player", name, "for", alert.delay, - "seconds.") - --@end-debug@ - end - end -end - -function Shitlist:AlertDelayTimer(name) - -- Called within ScheduleTimer and fires when timer ends. - --@debug@ - Shitlist:PrintDebug("|cffff0000|cffffffff Sound effect is now enabled for player", name) - --@end-debug@ - Shitlist.db.profile.alert.last[name] = nil -end - -function Shitlist:MiniMapIcon() - -- Create minimap launcher - -- https://github.com/tekkub/libdatabroker-1-1/wiki/How-to-provide-a-dataobject - return LibDataBroker:NewDataObject(shitlist, { - type = "launcher", - text = shitlist, - icon = Shitlist.db.profile.icon, - OnClick = function(clickedframe, button) - AceConfigDialog:Close("ShitlistSettings Options") - AceConfigDialog:CloseAll() - local AceGUI = Shitlist:AceGUIDefaults() - if button == "RightButton" then - InterfaceOptionsFrame_OpenToCategory(shitlist) - elseif button == "LeftButton" then - if IsShiftKeyDown() then - AceGUI:SetTitle(L["SHITLIST_REASONS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Reasons", 500, 200) - AceConfigDialog:Open("ShitlistSettings Reasons") - elseif IsControlKeyDown() then - AceGUI:SetTitle(L["SHITLIST_LISTED_PLAYERS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Listed_Players", 500, 300) - AceConfigDialog:Open("ShitlistSettings Listed_Players") - else - AceGUI:SetTitle(L["SHITLIST_SETTINGS_TITLE"]) - AceConfigDialog:SetDefaultSize("ShitlistSettings Options", 500, 350) - AceConfigDialog:Open("ShitlistSettings Options") - end - end - end, - OnTooltipShow = function(tooltip) - tooltip:AddDoubleLine("|T" .. Shitlist.db.profile.icon .. ":0|t " .. L["SHITLIST_MINIMAP_TOOLTIP_TITLE"], - Shitlist: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"]) - end, - }) -end - -function Shitlist:ToggleMiniMapIcon() - self.db.profile.minimap.hide = not self.db.profile.minimap.hide - self:RefreshConfig() -end - -function Shitlist:ToggleDebug() - self.db.profile.debug = not self.db.profile.debug - self:RefreshConfig() -end diff --git a/Shitlist.toc b/Shitlist.toc deleted file mode 100644 index f39afd2..0000000 --- a/Shitlist.toc +++ /dev/null @@ -1,23 +0,0 @@ -## Interface: 110002 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. -## Author: Limmek -## Version: @project-version@ -## Dependencies: -## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT -## IconTexture: Interface\AddOns\Shitlist\Images\shitlist.png - -embeds.xml - -Locales\Locales.xml - -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua diff --git a/ShitlistUtils.lua b/ShitlistUtils.lua deleted file mode 100644 index e41a53c..0000000 --- a/ShitlistUtils.lua +++ /dev/null @@ -1,61 +0,0 @@ -local shitlist = ... -local L = LibStub("AceLocale-3.0"):GetLocale(shitlist, true) - -function Shitlist:GetVersion() - return tostring(GetAddOnMetadata(shitlist, "Version")) or L["SHITLIST_NA"]; -end - -function Shitlist:GetTitle() - return GetAddOnMetadata(shitlist, "Title") or L["SHITLIST_NA"]; -end - -function Shitlist:GetAuthor() - return GetAddOnMetadata(shitlist, "Author") or L["SHITLIST_NA"]; -end - -function Shitlist:GetNotes() - return GetAddOnMetadata(shitlist, "Notes") or L["SHITLIST_NA"]; -end - -function Shitlist:GetLocalizations() - return GetAddOnMetadata(shitlist, "X-Localizations") or L["SHITLIST_NA"]; -end - -function Shitlist:GetCategory() - return GetAddOnMetadata(shitlist, "X-Category") or L["SHITLIST_NA"]; -end - -function Shitlist:GetWebsite() - return GetAddOnMetadata(shitlist, "X-Website") or L["SHITLIST_NA"]; -end - -function Shitlist:GetLicense() - return GetAddOnMetadata(shitlist, "X-License") or L["SHITLIST_NA"]; -end - -function Shitlist:AceGUIDefaults() - local aceGUI = LibStub("AceGUI-3.0"):Create("Frame") - aceGUI:SetCallback("OnClose", function(widget) aceGUI:Release() end) - aceGUI:SetLayout("Fill") - aceGUI:SetStatusText(nil) - aceGUI.statustext:Hide() - aceGUI.statustext:GetParent():Hide() - aceGUI:Hide() - return aceGUI -end - -function Shitlist:Print(...) - if (self.db and self.db.profile.debug) then - return print(L["SHITLIST_DEBUG"], ...) - end - return print(L["SHITLIST_PRINT"], ...) -end - ---@debug@ -function Shitlist:PrintDebug(...) - if (self.db and self.db.profile.debug) then - self:Print(...) - end -end - ---@end-debug@ diff --git a/Shitlist_Cata.toc b/Shitlist_Cata.toc deleted file mode 100644 index 0694d28..0000000 --- a/Shitlist_Cata.toc +++ /dev/null @@ -1,22 +0,0 @@ -## Interface: 40400 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. -## Author: Limmek -## Version: @project-version@ -## Dependencies: -## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT - -embeds.xml - -Locales\Locales.xml - -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua diff --git a/Shitlist_Vanilla.toc b/Shitlist_Vanilla.toc deleted file mode 100644 index 25f0ea3..0000000 --- a/Shitlist_Vanilla.toc +++ /dev/null @@ -1,22 +0,0 @@ -## Interface: 11503 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. -## Author: Limmek -## Version: @project-version@ -## Dependencies: -## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT - -embeds.xml - -Locales\Locales.xml - -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua diff --git a/Shitlist_Wrath.toc b/Shitlist_Wrath.toc deleted file mode 100644 index 09900ce..0000000 --- a/Shitlist_Wrath.toc +++ /dev/null @@ -1,22 +0,0 @@ -## Interface: 30403 -## Title : Shitlist -## Notes: Set a personal comment on players and adding it to player information tooltip window. -## Author: Limmek -## Version: @project-version@ -## Dependencies: -## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1, LibDBIcon-1.0, CallbackHandler-1.0 -## SavedVariables: ShitlistDB -## DefaultState: enabled -## X-Category: Tooltip, Miscellaneous, PvP, Quests & Leveling, Unit Frames -## X-Curse-Project-ID: 344967 -## X-Localizations: enUS -## X-Website: https://github.com/Limmek/Shitlist -## X-License: MIT - -embeds.xml - -Locales\Locales.xml - -Shitlist.lua -ShitlistUtils.lua -ShitlistConfig.lua 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