From c61835aaff333e7258f9ab46df51f3bbac69a5c9 Mon Sep 17 00:00:00 2001 From: John Pasula Date: Thu, 18 Mar 2010 17:44:35 -0600 Subject: [PATCH] Add options to choose between CSV/BBC for text dump. 100% dry-coded while whacked on flu medicine. --- ARL.lua | 7 ++++++- Config.lua | 34 ++++++++++++++++++++++++++++++++++ Locales/testenUS.lua | 8 ++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/ARL.lua b/ARL.lua index 54badbb..e829a60 100644 --- a/ARL.lua +++ b/ARL.lua @@ -219,6 +219,11 @@ function addon:OnInitialize() mapquest = true, ------------------------------------------------------------------------------- + -- Text Dump Options + ------------------------------------------------------------------------------- + textdumpformat = "BBCode", + + ------------------------------------------------------------------------------- -- Recipe Exclusion ------------------------------------------------------------------------------- exclusionlist = {}, @@ -1876,7 +1881,7 @@ do ---Dumps the recipe database in a format that is readable to humans. function addon:GetTextDump(profession) - local output = "BBCode" + local output = addon.db.profile.textdumpformat twipe(text_table) if not output or output == "Comma" then diff --git a/Config.lua b/Config.lua index 86f6dde..55cb261 100644 --- a/Config.lua +++ b/Config.lua @@ -171,6 +171,40 @@ local function fullOptions() } end, }, + spacer3 = { + order = 50, + type = "description", + name = "\n", + }, + header4 = { + order = 51, + type = "header", + name = L["Text Dump Options"], + }, + text_dump_desc = { + order = 52, + type = "description", + name = L["TEXTDUMP_OPTIONS_DESC"] .. "\n", + }, + textdump = { + order = 53, + type = "select", + name = L["Text Dump"], + desc = L["TEXT_DUMP_DESC"], + get = function() + return addon.db.profile.textdumpformat + end, + set = function(info, name) + addon.db.profile.textdumpformat = name + end, + values = function() + return { + Name = _G.NAME, + Comma = L["CSV"], + BBCode = L["BBCode"], + } + end, + }, }, }, }, diff --git a/Locales/testenUS.lua b/Locales/testenUS.lua index e936ea0..c59f6a1 100644 --- a/Locales/testenUS.lua +++ b/Locales/testenUS.lua @@ -1384,3 +1384,11 @@ L["Zorbin Fandazzle"] = true L["Zula Slagfury"] = true L["Zurai"] = true L["Zurii"] = true + + +L["Text Dump Options"] = true +L["TEXTDUMP_OPTIONS_DESC"] = "Options to change the behaviour of the text dump." +L["Text Dump"] = true +L["TEXT_DUMP_DESC"] = "Change how the text dump text appears." +L["BBCode"] = true +L["CSV"] = true \ No newline at end of file -- 1.7.9.5