From bc278e9a77aab7e867dfeb1f70503bbe98047e11 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 31 May 2016 14:53:32 +0200 Subject: [PATCH] -New debug tool ported over. --- data/drs.lua | 22 ++++++++++++++++++++-- data/optiontable.lua | 5 +++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/data/drs.lua b/data/drs.lua index 25571a5..09563a7 100644 --- a/data/drs.lua +++ b/data/drs.lua @@ -327,7 +327,7 @@ function Rekt:CreateDRFrames(which) t:SetPoint("CENTER", frame, "CENTER", 0, 0); t:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE, MONOCHROME") --frame:Hide(); - + Rekt.frames[which][i] = {} Rekt.frames[which][i]["frame"] = frame; Rekt.frames[which][i]["texture"] = text; @@ -430,4 +430,22 @@ function Rekt:HideSelfDRFrames() local frame = Rekt.frames["selfdr"][i]["frame"]; frame:Hide(); end -end \ No newline at end of file +end + +-- Debug Stuff: + +function Rekt:printAllDRsForGUID(guid) + local drs = Rekt.drs[dstGUID]; + + for k, v in pairs(drs) do + self:Print(k .. " " .. v); + + for ki, kvi in pairs(v) do + self:Print(" " .. ki .. " " .. kvi); + + for kj, kvj in pairs(kv) do + self:Print(" " .. kj .. " " .. kvj); + end + end + end +end diff --git a/data/optiontable.lua b/data/optiontable.lua index ebf078a..b5485d1 100644 --- a/data/optiontable.lua +++ b/data/optiontable.lua @@ -794,6 +794,11 @@ function Rekt:getDebugOptions() Rekt:setDebugLevel(v); end }, + debuglistselfdrs = { + type = "execute", name = "List SelfDRs", + desc = "List SelfDRs", order = 56, + func = function() return Rekt:printAllDRsForGUID(Rekt.targets["self"]); end, + }, } return args; end