FlightTimers - prepare editbox for data work.

To easy copy-paste.
This commit is contained in:
Sattva
2023-09-24 05:08:02 +03:00
parent 7925569931
commit 632290002d
3 changed files with 24 additions and 12 deletions
+17 -3
View File
@@ -6753,7 +6753,9 @@
debugString = debugString .. ":" .. destination
routeString = routeString .. ":" .. destination
end
debugString = debugString .. '"] = '
--debugString = debugString .. '"] = '
debugString = debugString .. '"]'
-- Show flight time in tooltip if it exists
if data[faction] and data[faction][continent] and data[faction][continent][routeString] then
@@ -6771,7 +6773,8 @@
local debugTwonumEnterHops = (GetNumRoutes(index) - 1)
-- Add node names to debug string
debugString = debugString .. " -- " .. nodeName
--debugString = debugString .. " -- " .. nodeName
debugString = debugString
-- for i = 20, numEnterHops do
-- local fpName = TaxiNodeName(i)
@@ -6786,12 +6789,23 @@
-- If debug string does not contain destination, add it to the end
if not string.find(debugString, barName) then
debugString = debugString .. ", " .. barName .. " with " .. debugTwonumEnterHops .. " hops"
--debugString = debugString .. ", " .. barName .. " with " .. debugTwonumEnterHops .. " hops"
debugString = debugString
end
-- Print debug string (used for showing full routes for nodes)
print(debugString)
-- Open the chat edit box, pre-fill with debugString, and highlight the text for easy copying
local defaultChatFrame = DEFAULT_CHAT_FRAME
if defaultChatFrame then
ChatFrame_OpenChat(debugString, defaultChatFrame)
local editBox = ChatFrame1EditBox
if editBox then
LibCompat.After(0.1, function() editBox:HighlightText() end)
end
end
end
end
end)