From 6dbb6f5b98f0d0a27f19fa533d6ef55bf2052858 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 19 Nov 2021 23:39:54 -0500 Subject: [PATCH] small simplified mode improvements --- eid_bagofcrafting.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index bbe85e02..f993582f 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -311,7 +311,7 @@ function EID:simulateBagOfCrafting(componentsTable) local poolString = "" local firstAfterBoss = false for k,v in ipairs(poolWeights) do - if (v.weight > 0) then + if (v.totalWeight > 0) then --line break after boss pool if (firstAfterBoss) then poolString = poolString .. " " end poolString = poolString .. poolToIcon[v.idx] .. ":" .. math.floor(v.totalWeight/totalWeight*100+0.5) .. "%," @@ -762,6 +762,10 @@ function EID:handleBagOfCraftingRendering() end if #EID.BagItems >0 then + if #EID.BagItems >= 8 then + local recipe = EID:calculateBagOfCrafting(EID.BagItems) + EID:appendToDescription(customDescObj, "{{Collectible"..recipe.."}} ") + end local bagDesc = EID:getDescriptionEntry("CraftingBagContent").."(Beta)" EID:appendToDescription(customDescObj, bagDesc..EID:tableToCraftingIconsMerged(EID.BagItems).."#") end @@ -785,7 +789,7 @@ function EID:handleBagOfCraftingRendering() local bestQualityDesc = EID:getDescriptionEntry("CraftingBestQuality") if (#EID.BagItems > 0) then EID:appendToDescription(customDescObj, bagQualityDesc .. " " .. bagQuality .. "#" .. bagResult .. "#") end - EID:appendToDescription(customDescObj, bestQualityDesc .. " " .. bestQuality .. "#{{Blank}} " .. tableToCraftingIcons(self,mostValuableSimp) .. "#" .. bestResult .. "#") + if (bestQuality > bagQuality) then EID:appendToDescription(customDescObj, bestQualityDesc .. " " .. bestQuality .. "#{{Blank}} " .. tableToCraftingIcons(self,mostValuableSimp) .. "#" .. bestResult .. "#") end EID:printDescription(customDescObj) return true