diff --git a/SousChef.lua b/SousChef.lua index 94ba325..2af9079 100644 --- a/SousChef.lua +++ b/SousChef.lua @@ -18,15 +18,19 @@ local COOKING_RANK_3 = [[SousChef\media\Three.dds]] local COOKING_RANK_4 = [[SousChef\media\Four.dds]] local COOKING_RANK_5 = [[SousChef\media\Five.dds]] local COOKING_RANK_6 = [[SousChef\media\Six.dds]] +local COOKING_FLAVOUR = [[SousChef\media\Flavour.dds]] +local COOKING_SPICE = [[SousChef\media\Spice.dds]] local COOKING_RANK_1B = [[SousChef\media\One_flat.dds]] local COOKING_RANK_2B = [[SousChef\media\Two_flat.dds]] local COOKING_RANK_3B = [[SousChef\media\Three_flat.dds]] local COOKING_RANK_4B = [[SousChef\media\Four_flat.dds]] local COOKING_RANK_5B = [[SousChef\media\Five_flat.dds]] local COOKING_RANK_6B = [[SousChef\media\Six_flat.dds]] +local COOKING_FLAVOURB = [[SousChef\media\flavour_flat.dds]] +local COOKING_SPICEB = [[SousChef\media\Spice_Flat.dds]] -local COOKING = { COOKING_RANK_1, COOKING_RANK_2, COOKING_RANK_3, COOKING_RANK_4, COOKING_RANK_5, COOKING_RANK_6, COOKING_RANK_5B, COOKING_RANK_6B } -local COOKINGB = { COOKING_RANK_1B, COOKING_RANK_2B, COOKING_RANK_3B, COOKING_RANK_4B, COOKING_RANK_5B, COOKING_RANK_6B, COOKING_RANK_5, COOKING_RANK_6 } +local COOKING = { COOKING_RANK_1, COOKING_RANK_2, COOKING_RANK_3, COOKING_RANK_4, COOKING_RANK_5, COOKING_RANK_6, COOKING_FLAVOUR, COOKING_SPICE } +local COOKINGB = { COOKING_RANK_1B, COOKING_RANK_2B, COOKING_RANK_3B, COOKING_RANK_4B, COOKING_RANK_5B, COOKING_RANK_6B, COOKING_FLAVOURB, COOKING_SPICEB } local CANLEARN = [[/esoui/art/loot/loot_finesseitem.dds]] local containerHooks = { INVENTORY_BACKPACK, INVENTORY_BANK, INVENTORY_GUILD_BANK } @@ -43,16 +47,16 @@ local function GetItemID(link) return tonumber(string.match(string.match(link, "%d+:"), "%d+")) end -local function EndsWith(String,End) +function EndsWith(String,End) return End=='' or string.sub(String,-string.len(End))==End end -local function StartsWith(String,Start) +function StartsWith(String,Start) return Start=='' or string.sub(String, 1, string.len(Start))==Start end local languageElements = {"de ", "à ", "la ", } -local separators = {"%^(%a+)", ":(%a+)", "-", " " } +local separators = {"%^(%a+)", "-", " " } local function StripLanguageIdentifiers(entry) for _,v in pairs(languageElements) do @@ -90,7 +94,7 @@ local function MatchInCookbook(name) for recipe,known in pairs(SousChef.Cookbook) do if StartsWith(name,recipe) or EndsWith(name, recipe) then local difference = (#recipe + #CleanString(GetString(SI_ITEMTYPE29)) - #name) - if difference < 3 and difference >= 0 then + if difference < 3 and difference > -3 then return known end end @@ -103,7 +107,7 @@ local function MatchInGlobalCookbook(name) for recipe,known in pairs(SousChef.settings.Cookbook) do if StartsWith(name,recipe) or EndsWith(name, recipe) then local difference = (#recipe + #CleanString(GetString(SI_ITEMTYPE29)) - #name) - if difference < 3 and difference >= 0 then + if difference < 3 and difference > - 3 then return known end end diff --git a/media/Flavour.dds b/media/Flavour.dds new file mode 100644 index 0000000..ef58fce Binary files /dev/null and b/media/Flavour.dds differ diff --git a/media/Spice.dds b/media/Spice.dds new file mode 100644 index 0000000..107e80f Binary files /dev/null and b/media/Spice.dds differ diff --git a/media/Spice_Flat.dds b/media/Spice_Flat.dds new file mode 100644 index 0000000..d299093 Binary files /dev/null and b/media/Spice_Flat.dds differ diff --git a/media/flavour_flat.dds b/media/flavour_flat.dds new file mode 100644 index 0000000..fb57fd3 Binary files /dev/null and b/media/flavour_flat.dds differ