From 2b9caadac1f57ff3875e93f3a8d55fd7b8fe1f7c Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Fri, 14 Jun 2024 05:52:12 +0200 Subject: [PATCH] Fixed issue with debug replacements --- .editorconfig | 3 ++- Utils/tokenData.lua | 2 -- core.lua | 37 ++++++++++++++++++++----------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9a3c0538..0f84d094 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,4 +5,5 @@ tab_width = 4 table_separator_style = none trailing_table_separator = always quote_style = double -max_line_length = 120 \ No newline at end of file +max_line_length = 120 +allow_non_indented_comments = true \ No newline at end of file diff --git a/Utils/tokenData.lua b/Utils/tokenData.lua index 54a7b46c..ecc794df 100644 --- a/Utils/tokenData.lua +++ b/Utils/tokenData.lua @@ -146,8 +146,6 @@ function RCLootCouncil:ExportTokenDataSingle(id) end end ---@end-debug@ - -- Equip locations _G.RCTokenTable = { [22349] = "ChestSlot", -- Desecrated Breastplate, diff --git a/core.lua b/core.lua index 111a2f23..3139d18d 100644 --- a/core.lua +++ b/core.lua @@ -435,18 +435,7 @@ function RCLootCouncil:ChatCommand(msg) elseif input == "history" or input == string.lower(_G.HISTORY) or input == "h" or input == "his" or input == "hist" then self:CallModule("history") - -- @debug@ - elseif input == "nnp" then - self.nnp = not self.nnp - self:Print("nnp = " .. tostring(self.nnp)) - elseif input == "exporttrinketdata" then - self:ExportTrinketData(tonumber(args[1]), 0, tonumber(args[2]), 1) - elseif input == 'trinkettest' or input == 'ttest' then - self.playerClass = string.upper(args[1]) - self:Test(1, false, true) - elseif input == "exporttokendata" then - self:ExportTokenData(tonumber(args[1])) - -- @end-debug@ + elseif input == "whisper" or input == string.lower(_G.WHISPER) then self:Print(L["whisper_help"]) @@ -528,10 +517,24 @@ function RCLootCouncil:ChatCommand(msg) elseif input == "safemode" then db.safemode = not db.safemode self:Print("SafeMode " .. (db.safemode and "On" or "Off")) - -- @debug@ elseif input == "export" then - self:ExportCurrentSession() + self:ExportCurrentSession() + + --@debug@ + elseif input == "nnp" then + self.nnp = not self.nnp + self:Print("nnp = " .. tostring(self.nnp)) + + elseif input == "exporttrinketdata" then + self:ExportTrinketData(tonumber(args[1]), 0, tonumber(args[2]), 1) + + elseif input == "trinkettest" or input == "ttest" then + self.playerClass = string.upper(args[1]) + self:Test(1, false, true) + + elseif input == "exporttokendata" then + self:ExportTokenData(tonumber(args[1])) elseif input == 't' then -- Tester cmd -- Test items with several modifiers. Should probably be added to the regular test func @@ -543,7 +546,7 @@ function RCLootCouncil:ChatCommand(msg) print(Player:Get(guid), "in guild = ", inGuild) end end - -- @end-debug@ + --@end-debug@ else -- Check if the input matches anything for k, v in pairs(self.customChatCmd) do if k == input then return v.module[v.func](v.module, unpack(args)) end end @@ -2433,8 +2436,8 @@ end function RCLootCouncil:GetResponseColor(type, name) return unpack(self:GetResponse(type, name).color) end -- #end UI Functions ----------------------------------------------------- --- @debug@ -- debug func +--@debug@ _G.printtable = function(data, level) if not data then return end level = level or 0 @@ -2453,7 +2456,7 @@ _G.printtable = function(data, level) until true end end --- @end-debug@ +--@end-debug@ function RCLootCouncil:ExportCurrentSession() if not lootTable or #lootTable == 0 then return self:Print(L["No session running"]) end