diff --git a/FurnitureCatalogue/FurCDatabaseQuery.lua b/FurnitureCatalogue/FurCDatabaseQuery.lua index 29e3240..d83be25 100644 --- a/FurnitureCatalogue/FurCDatabaseQuery.lua +++ b/FurnitureCatalogue/FurCDatabaseQuery.lua @@ -155,6 +155,12 @@ function FurC.GetMiscItemSource(recipeKey, recipeArray) return originData[recipeKey] end +local function getRecipeSource(recipeKey, recipeArray) + if nil == recipeKey and nil == recipeArray then return end + if nil == FurC.RecipeSources then return end + return FurC.RecipeSources[recipeKey] +end +FurC.getRecipeSource = getRecipeSource function FurC.getRumourSource(recipeKey, recipeArray) return (recipeArray.blueprint and GetString(SI_FURC_RUMOUR_SOURCE_RECIPE)) or GetString(SI_FURC_RUMOUR_SOURCE_ITEM) end diff --git a/FurnitureCatalogue/FurCTooltip.lua b/FurnitureCatalogue/FurCTooltip.lua index cc13a38..3e94594 100644 --- a/FurnitureCatalogue/FurCTooltip.lua +++ b/FurnitureCatalogue/FurCTooltip.lua @@ -42,6 +42,9 @@ local function addTooltipData(control, itemLink) if not isRecipe and (not FurC.GetHideCraftingStation()) then stringTable = add(stringTable, FurC.PrintCraftingStation(itemId, recipeArray)) end + if isRecipe then + stringTable = add(stringTable, FurC.getRecipeSource(itemId, recipeArray)) + end -- check if we should show mats if not (FurC.GetHideMats() or isRecipe) then stringTable = add(stringTable, FurC.GetMats(itemLink, recipeArray, true):gsub(", ", "\n")) diff --git a/FurnitureCatalogue/data/RecipeSources.lua b/FurnitureCatalogue/data/RecipeSources.lua new file mode 100644 index 0000000..bf3039a --- /dev/null +++ b/FurnitureCatalogue/data/RecipeSources.lua @@ -0,0 +1,3 @@ +FurC.RecipeSources = { + +} \ No newline at end of file diff --git a/FurnitureCatalogue/locale/de.lua b/FurnitureCatalogue/locale/de.lua index 80e30e6..5997bda 100644 --- a/FurnitureCatalogue/locale/de.lua +++ b/FurnitureCatalogue/locale/de.lua @@ -132,6 +132,7 @@ local strings = { SI_FURC_CROWN = "Crown Store", SI_FURC_RUMOUR = "Rumour items", SI_FURC_LUXURY = "Luxury items", + SI_FURC_RUMOUR = "Rumour items", SI_FURC_OTHER = "Other", SI_FURC_FILTER_VERSION_OFF = "Version filter: off", diff --git a/FurnitureCatalogue/locale/en.lua b/FurnitureCatalogue/locale/en.lua index 862bc56..1f9d70c 100644 --- a/FurnitureCatalogue/locale/en.lua +++ b/FurnitureCatalogue/locale/en.lua @@ -154,6 +154,7 @@ local strings = { SI_FURC_CROWN = "Crown Store", SI_FURC_RUMOUR = "Rumour items", SI_FURC_LUXURY = "Luxury items", + SI_FURC_RUMOUR = "Rumour items", SI_FURC_OTHER = "Other", SI_FURC_FILTER_VERSION_OFF = "Version filter: off", diff --git a/FurnitureCatalogue/locale/fr.lua b/FurnitureCatalogue/locale/fr.lua index 09c2df4..2a98ebb 100644 --- a/FurnitureCatalogue/locale/fr.lua +++ b/FurnitureCatalogue/locale/fr.lua @@ -60,7 +60,7 @@ local strings = { SI_FURC_STRING_MENU_SCAN_FILES_TT = "Will run a full scan of the data in Furniture Catalogue's files", SI_FURC_STRING_MENU_SCAN_CHAR_NAME = "Scan character", SI_FURC_STRING_MENU_SCAN_CHAR_TT = "Will run a full scan of your known furniture recipes and update the database accordingly", - SI_FURC_STRING_MENU_DELETE_CHAR_NAME = "delete character", + SI_FURC_STRING_MENU_DELETE_CHAR_NAME = "delete character", SI_FURC_STRING_MENU_DELETE_CHAR_TT = "Deletes all knowledge for this character from the database. \nCharacter will be scanned again the next time they log in with the add-on enabled. \n Character name won't show up in the dropdown if they don't know any recipes!", SI_FURC_STRING_MENU_DELETE_CHAR_WARNING = "Character knowledge will be wiped immediately", SI_FURC_STRING_MENU_ENABLE_SHOPPINGLIST = "Enable integration?", @@ -133,6 +133,7 @@ local strings = { SI_FURC_CROWN = "Crown Store", SI_FURC_RUMOUR = "Rumour items", SI_FURC_LUXURY = "Luxury items", + SI_FURC_RUMOUR = "Rumour items", SI_FURC_OTHER = "Other", SI_FURC_FILTER_VERSION_OFF = "Version filter: off", diff --git a/FurnitureCatalogue/locale/jp.lua b/FurnitureCatalogue/locale/jp.lua index 45f4654..b6d46ea 100644 --- a/FurnitureCatalogue/locale/jp.lua +++ b/FurnitureCatalogue/locale/jp.lua @@ -60,7 +60,7 @@ local strings = { SI_FURC_STRING_MENU_SCAN_FILES_TT = "Will run a full scan of the data in Furniture Catalogue's files", SI_FURC_STRING_MENU_SCAN_CHAR_NAME = "Scan character", SI_FURC_STRING_MENU_SCAN_CHAR_TT = "Will run a full scan of your known furniture recipes and update the database accordingly", - SI_FURC_STRING_MENU_DELETE_CHAR_NAME = "delete character", + SI_FURC_STRING_MENU_DELETE_CHAR_NAME = "delete character", SI_FURC_STRING_MENU_DELETE_CHAR_TT = "Deletes all knowledge for this character from the database. \nCharacter will be scanned again the next time they log in with the add-on enabled. \n Character name won't show up in the dropdown if they don't know any recipes!", SI_FURC_STRING_MENU_DELETE_CHAR_WARNING = "Character knowledge will be wiped immediately", SI_FURC_STRING_MENU_ENABLE_SHOPPINGLIST = "Enable integration?", @@ -133,6 +133,7 @@ local strings = { SI_FURC_CROWN = "Crown Store", SI_FURC_RUMOUR = "Rumour items", SI_FURC_LUXURY = "Luxury items", + SI_FURC_RUMOUR = "Rumour items", SI_FURC_OTHER = "Other", SI_FURC_FILTER_VERSION_OFF = "Version filter: off", diff --git a/FurnitureCatalogue/locale/ru.lua b/FurnitureCatalogue/locale/ru.lua index 45f4654..b6d46ea 100644 --- a/FurnitureCatalogue/locale/ru.lua +++ b/FurnitureCatalogue/locale/ru.lua @@ -60,7 +60,7 @@ local strings = { SI_FURC_STRING_MENU_SCAN_FILES_TT = "Will run a full scan of the data in Furniture Catalogue's files", SI_FURC_STRING_MENU_SCAN_CHAR_NAME = "Scan character", SI_FURC_STRING_MENU_SCAN_CHAR_TT = "Will run a full scan of your known furniture recipes and update the database accordingly", - SI_FURC_STRING_MENU_DELETE_CHAR_NAME = "delete character", + SI_FURC_STRING_MENU_DELETE_CHAR_NAME = "delete character", SI_FURC_STRING_MENU_DELETE_CHAR_TT = "Deletes all knowledge for this character from the database. \nCharacter will be scanned again the next time they log in with the add-on enabled. \n Character name won't show up in the dropdown if they don't know any recipes!", SI_FURC_STRING_MENU_DELETE_CHAR_WARNING = "Character knowledge will be wiped immediately", SI_FURC_STRING_MENU_ENABLE_SHOPPINGLIST = "Enable integration?", @@ -133,6 +133,7 @@ local strings = { SI_FURC_CROWN = "Crown Store", SI_FURC_RUMOUR = "Rumour items", SI_FURC_LUXURY = "Luxury items", + SI_FURC_RUMOUR = "Rumour items", SI_FURC_OTHER = "Other", SI_FURC_FILTER_VERSION_OFF = "Version filter: off", diff --git a/FurnitureCatalogue/startup.lua b/FurnitureCatalogue/startup.lua index f4c05a3..482cb01 100644 --- a/FurnitureCatalogue/startup.lua +++ b/FurnitureCatalogue/startup.lua @@ -140,8 +140,6 @@ local function getSourceIndicesKeys() end sourceIndicesKeys[FURC_OTHER] = "other" - - return sourceIndicesKeys end @@ -160,10 +158,10 @@ local function getChoicesSource() choicesSource[FURC_CROWN] = GetString(SI_FURC_CROWN) end if not FurC.GetHideRumourRecipesEntry() then - choicesSource[FURC_RUMOUR] = GetString(SI_FURC_LUXURY) + choicesSource[FURC_RUMOUR] = GetString(SI_FURC_RUMOUR) end if not FurC.GetMergeLuxuryAndSales() then - choicesSource[FURC_LUXURY] = GetString(SI_FURC_OTHER) + choicesSource[FURC_LUXURY] = GetString(SI_FURC_LUXURY) end return choicesSource end @@ -182,10 +180,10 @@ local function getTooltipsSource() tooltipsSource[FURC_CROWN] = GetString(SI_FURC_CROWN_TT) end if not FurC.GetHideRumourRecipesEntry() then - tooltipsSource[FURC_RUMOUR] = GetString(SI_FURC_LUXURY_TT) + tooltipsSource[FURC_RUMOUR] = GetString(SI_FURC_RUMOUR_TT) end if not FurC.GetMergeLuxuryAndSales() then - tooltipsSource[FURC_LUXURY] = GetString(SI_FURC_OTHER_TT) + tooltipsSource[FURC_LUXURY] = GetString(SI_FURC_LUXURY_TT) end return tooltipsSource end