Skip to content

Commit

Permalink
Fixed issue with debug replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
evil-morfar committed Jun 14, 2024
1 parent c0ffe40 commit 2b9caad
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ tab_width = 4
table_separator_style = none
trailing_table_separator = always
quote_style = double
max_line_length = 120
max_line_length = 120
allow_non_indented_comments = true
2 changes: 0 additions & 2 deletions Utils/tokenData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ function RCLootCouncil:ExportTokenDataSingle(id)
end
end

--@end-debug@

-- Equip locations
_G.RCTokenTable = {
[22349] = "ChestSlot", -- Desecrated Breastplate,
Expand Down
37 changes: 20 additions & 17 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2b9caad

Please sign in to comment.