From 33aac6cae2557ec12c2525925e47b0100c1b39ca Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 16 Nov 2020 15:23:06 +0100 Subject: [PATCH] macrotweak: migrate to new slash command api --- modules/macrotweak.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/macrotweak.lua b/modules/macrotweak.lua index f14ba406..bb8407e9 100644 --- a/modules/macrotweak.lua +++ b/modules/macrotweak.lua @@ -19,12 +19,11 @@ pfUI:RegisterModule("macrotweak", "vanilla", function () end -- add /use and /equip to the macro api - _G.SLASH_PFUSE1, _G.SLASH_PFUSE2, _G.SLASH_PFUSE3, _G.SLASH_PFUSE4 = '/use', '/pfuse', '/equip', '/pfequip' - function _G.SlashCmdList.PFUSE(msg) + pfUI.api.RegisterSlashCommand("PFUSE", { "/equip" , "/use", "/pfequip", "/pfuse" }, function (msg) if not msg or msg == "" then return end local bag, slot = FindItem(msg) if bag and slot then UseContainerItem(bag, slot) end - end + end) end)