From cc8b8b476baaf0b32a5fa9fbe2899bd5cb7b9548 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed, 9 Sep 2026 23:05:10 -0500 Subject: [PATCH] Removed macrotweak --- API_Check.lua | 2 +- api/config.lua | 1 - env/translations_deDE.lua | 1 - env/translations_enUS.lua | 1 - env/translations_esES.lua | 1 - env/translations_frFR.lua | 1 - env/translations_koKR.lua | 1 - env/translations_ruRU.lua | 1 - env/translations_zhCN.lua | 1 - env/translations_zhTW.lua | 1 - init/modules.xml | 1 - modules/actionbar.lua | 70 +-------------------------------------- modules/gui.lua | 6 +--- modules/macrotweak.lua | 69 -------------------------------------- 14 files changed, 3 insertions(+), 154 deletions(-) delete mode 100644 modules/macrotweak.lua diff --git a/API_Check.lua b/API_Check.lua index df5170e6..45c8c2bc 100644 --- a/API_Check.lua +++ b/API_Check.lua @@ -13,7 +13,7 @@ do -- on. There pfUI does load, and will throw wherever it reaches for something -- the installed DLL doesn't have yet -- the popup names the cause so those -- errors aren't a mystery. - local PFUI_CLASSIC_API_MIN = 11304 -- (X*10000 + Y*100 + Z) + local PFUI_CLASSIC_API_MIN = 11500 -- (X*10000 + Y*100 + Z) local PFUI_CLASSIC_API_LATEST = PFUI_CLASSIC_API_MIN local PFUI_CLASSIC_API_WEBSITE = "https://github.com/brues-code/ClassicAPI" local PFUI_CLASSIC_API_LATEST_URL = PFUI_CLASSIC_API_WEBSITE .. "/releases/latest" diff --git a/api/config.lua b/api/config.lua index 7e917a07..f7d74e68 100644 --- a/api/config.lua +++ b/api/config.lua @@ -645,7 +645,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("bars", nil, "animation", "zoomfade") pfUI:UpdateConfig("bars", nil, "animmode", "keypress") pfUI:UpdateConfig("bars", nil, "animalways", "0") - pfUI:UpdateConfig("bars", nil, "macroscan", "1") pfUI:UpdateConfig("bars", nil, "reagents", "1") pfUI:UpdateConfig("bars", nil, "hunterbar", "0") pfUI:UpdateConfig("bars", nil, "pagemasteralt", "0") diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index 108601bb..b0492a27 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -670,7 +670,6 @@ pfUI_translation["deDE"] = { ["Scale"] = nil, ["Scale Border On HiDPI Displays"] = nil, ["Scaling"] = nil, - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = nil, ["Screenshot"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index 4b0bfb90..64feeea7 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -683,7 +683,6 @@ pfUI_translation["enUS"] = { ["Scale"] = nil, ["Scale Border On HiDPI Displays"] = nil, ["Scaling"] = nil, - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = nil, ["Screenshot"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 0bb0fc3d..dade5647 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -670,7 +670,6 @@ pfUI_translation["esES"] = { ["Scale"] = "Escala", ["Scale Border On HiDPI Displays"] = "Escalar los bordes en las pantallas con DPI alto", ["Scaling"] = "Escalada", - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = "Intensidad de brillo en los bordes de la pantalla", ["Screen Resolution"] = "Resolución de pantalla", ["Screenshot"] = "Captura de pantalla", diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index c8f250bf..b041ae74 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -670,7 +670,6 @@ pfUI_translation["frFR"] = { ["Scale"] = "Échelle", ["Scale Border On HiDPI Displays"] = "Échelle de bordure sur les écrans HiDPI", ["Scaling"] = "Mise à l'échelle", - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = "Résolution d'écran", ["Screenshot"] = "Imprime écran", diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index bb05b818..1a8f7799 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -670,7 +670,6 @@ pfUI_translation["koKR"] = { ["Scale"] = nil, ["Scale Border On HiDPI Displays"] = nil, ["Scaling"] = nil, - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = "화면 해상도", ["Screenshot"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index 595ed9b8..c2a14231 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -670,7 +670,6 @@ pfUI_translation["ruRU"] = { ["Scale"] = "Масштаб", ["Scale Border On HiDPI Displays"] = "Масштабировать границы на HiDPI мониторах", ["Scaling"] = "Масштаб интерфейса", - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = "Интенсивность свечения на краях экрана", ["Screen Resolution"] = "Разрешение экрана", ["Screenshot"] = "Снимок экрана", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index 6e3467fe..670bbd00 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -670,7 +670,6 @@ pfUI_translation["zhCN"] = { ["Scale"] = "比例", ["Scale Border On HiDPI Displays"] = "缩放高DPI显示器上的边框", ["Scaling"] = "UI缩放", - ["Scan Macros For Spells"] = "扫描宏命令中的法术", ["Screen Edge Glow Intensity"] = "屏幕边缘发光强度", ["Screen Resolution"] = "屏幕分辨率", ["Screenshot"] = "屏幕截图", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index 6438d0cd..698155cd 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -670,7 +670,6 @@ pfUI_translation["zhTW"] = { ["Scale"] = "比例", ["Scale Border On HiDPI Displays"] = nil, ["Scaling"] = nil, - ["Scan Macros For Spells"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = "螢幕解析度", ["Screenshot"] = nil, diff --git a/init/modules.xml b/init/modules.xml index eeecf935..8189e378 100644 --- a/init/modules.xml +++ b/init/modules.xml @@ -70,7 +70,6 @@ - diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 802b0f83..8d95b32a 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -360,68 +360,6 @@ pfUI:RegisterModule("actionbar", function () end end - local function ButtonMacroScan(self) - if self.bar > 10 then return end - if not self.scanmacro then return end - if pfUI.bars.skip_macro then return end - - -- SuperCleveRoidMacros: for macros it manages, leave spellslot/booktype unset - -- so the button's icon, cooldown, and tooltip flow through the hooked - -- GetActionTexture / GetActionCooldown / GameTooltip:SetAction and follow the - -- active conditional dynamically, instead of being frozen to the first - -- statically-scanned spell. - if CleveRoids and CleveRoids.IsManagedAction and CleveRoids.IsManagedAction(self.id) then - self.spellslot, self.booktype, self.spellID = nil, nil, nil - return - end - - local kind, slot = GetActionInfo(self.id) - self.spellslot, self.booktype, self.spellID = nil, nil, nil - if kind == 'macro' then - local name, _, body = GetMacroInfo(slot) - - if name and body then - local match - - for line in gfind(body, "[^%\n]+") do - _, _, match = string.find(line, '^#showtooltip (.+)') - - -- allow the user to disable the scan - if match and strfind(match, "disable") then - return - end - - if not match then - -- add support to specify custom tooltips via: - -- /run --showtooltip SPELLNAME - _, _, match = string.find(line, '%-%-showtooltip (.+)') - end - - if not match then - _, _, match = string.find(line, '^/cast (.+)') - end - - if not match then - _, _, match = string.find(line, '^/pfcast (.+)') - end - - if not match then - _, _, match = string.find(line, '^/pfmouse (.+)') - end - - if not match then - _, _, match = string.find(line, 'CastSpellByName%(%"(.+)%"%)') - end - - if match then - self.spellslot, self.booktype, self.spellID = select(7, libspell.GetSpellInfo(match)) - if self.spellslot and self.spellslot > 0 then return end - end - end - end - end - end - local function ButtonEnter(self) self = self or this @@ -690,7 +628,6 @@ pfUI:RegisterModule("actionbar", function () local function ButtonFullUpdate(button) if not button then return end - ButtonMacroScan(button) ButtonSlotUpdate(button) ButtonRangeUpdate(button) ButtonUsableUpdate(button) @@ -1166,12 +1103,7 @@ pfUI:RegisterModule("actionbar", function () f.count:SetJustifyH("RIGHT") f.count:SetJustifyV("BOTTOM") - -- macro spell scan (disabled when macro addons are loaded) - if C.bars.macroscan == "0" or pfUI:MacroAddonsLoaded() then - f.scanmacro, f.spellslot, f.booktype = nil, nil, nil - else - f.scanmacro = true - end + f.scanmacro, f.spellslot, f.booktype = nil, nil, nil -- range glow color f.rangeColor = GetStringColorObject(C.bars.rangecolor) diff --git a/modules/gui.lua b/modules/gui.lua index 7ebe729a..8dcd85e2 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2556,9 +2556,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(U["bars"], T["Button Animation"], C.bars, "animation", "dropdown", pfUI.gui.dropdowns.actionbuttonanimations) CreateConfig(U["bars"], T["Button Animation Trigger"], C.bars, "animmode", "dropdown", pfUI.gui.dropdowns.animationmode) CreateConfig(U["bars"], T["Show Animation On Hidden Bars"], C.bars, "animalways", "checkbox") - if not pfUI:MacroAddonsLoaded() then - CreateConfig(U["bars"], T["Scan Macros For Spells"], C.bars, "macroscan", "checkbox", nil, nil, nil, nil) - end CreateConfig(U["bars"], T["Show Reagent Count"], C.bars, "reagents", "checkbox") CreateConfig(U["bars"], T["Highlight Equipped Items"], C.bars, "showequipped", "checkbox") CreateConfig(U["bars"], T["Equipped Item Color"], C.bars, "eqcolor", "color") @@ -3029,8 +3026,7 @@ pfUI:RegisterModule("gui", function () CreateGUIEntry(T["Components"], T["Modules"], function() table.sort(pfUI.modules) for i,m in pairs(pfUI.modules) do - -- skip gui and macrotweak when macro addons are loaded - if m ~= "gui" and not (m == "macrotweak" and pfUI:MacroAddonsLoaded()) then + if m ~= "gui" then -- create disabled entry if not existing and display pfUI:UpdateConfig("disabled", nil, m, "0") CreateConfig(nil, T["Disable Module"] .. " " .. m, C.disabled, m, "checkbox") diff --git a/modules/macrotweak.lua b/modules/macrotweak.lua deleted file mode 100644 index 6bbba0a2..00000000 --- a/modules/macrotweak.lua +++ /dev/null @@ -1,69 +0,0 @@ -if CLASSIC_API_VERSION >= 11500 then return end - -pfUI:RegisterModule("macrotweak", function () - local conflictAddons = { "Supermacro", "SuperCleveRoidMacros", "UltimaMacros" } - local disabled = false - - for _, addon in pairs(conflictAddons) do - local name = addon - EventUtil.ContinueOnAddOnLoaded(name, function() - if not disabled then - DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: " .. name .. " found, macrotweak disabled.") - end - disabled = true - end) - end - - -- do not write macro calls into chat input history - -- (install once: _AddHistoryLine is our backup slot and is nil until we set it) - if not ChatFrameEditBox._AddHistoryLine then - local userinput - ChatFrameEditBox._AddHistoryLine = ChatFrameEditBox.AddHistoryLine - ChatFrameEditBox.AddHistoryLine = function(self, text) - if disabled then return ChatFrameEditBox._AddHistoryLine(self, text) end - if not userinput and text and string.find(text, "^/run(.+)") then return end - if not userinput and string.find(text, "^/script(.+)") then return end - if not userinput and string.find(text, "^/cast(.+)") then return end - ChatFrameEditBox._AddHistoryLine(self, text) - end - - local OnEnter = ChatFrameEditBox:GetScript("OnEnterPressed") - ChatFrameEditBox:SetScript("OnEnterPressed", function(a1,a2,a3,a4) - userinput = true - OnEnter(a1,a2,a3,a4) - userinput = nil - end) - end - - -- make sure #showtooltip inside macros won't be sent - local hookSendChatMessage = SendChatMessage - function _G.SendChatMessage(msg, ...) - if disabled then return hookSendChatMessage(msg, unpack(arg)) end - if msg and string.find(msg, "^#showtooltip ") then return end - hookSendChatMessage(msg, unpack(arg)) - end - - -- add /use and /equip to the macro api: - -- https://wowwiki.fandom.com/wiki/Making_a_macro - -- supported arguments: - -- /use - -- /use - -- /use - pfUI.api.RegisterSlashCommand("PFUSE", { "/equip" , "/use", "/pfequip", "/pfuse" }, function (msg) - if not msg or msg == "" then return end - local bag, slot, _ - if string.find(msg, "%d+%s+%d+") then - _, _, bag, slot = string.find(msg, "(%d+)%s+(%d+)") - elseif string.find(msg, "%d+") then - _, _, slot = string.find(msg, "(%d+)") - else - bag, slot = FindItem(msg) - end - - if bag and slot then - UseContainerItem(bag, slot) - elseif not bag and slot then - UseInventoryItem(slot) - end - end) -end) \ No newline at end of file