From 2aee604fd1678fb8ead7ab82c4d1ba8c38fe4a61 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 19 Nov 2021 21:09:28 -0500 Subject: [PATCH] add 8 icons display option --- eid_bagofcrafting.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index 711e50ba..bbe85e02 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -632,6 +632,9 @@ function EID:handleBagOfCraftingRendering() trackBagActivated() detectBagContentShift() + local tableToCraftingIcons = EID.tableToCraftingIconsMerged + if EID.Config["BagOfCraftingDisplayIcons"] then tableToCraftingIcons = EID.tableToCraftingIconsFull end + --prevent our hotkeys from triggering as they're set if not ModConfigMenu or not ModConfigMenu.IsVisible then if Input.IsButtonTriggered(EID.Config["CraftingHideKey"], 0) or Input.IsButtonTriggered(EID.Config["CraftingHideButton"], EID.player.ControllerIndex) then @@ -778,9 +781,11 @@ function EID:handleBagOfCraftingRendering() local bagQuality, bagResult = EID:simulateBagOfCrafting(EID.BagItems) local bestQuality, bestResult = EID:simulateBagOfCrafting(mostValuableSimp) + local bagQualityDesc = EID:getDescriptionEntry("CraftingBagQuality") + local bestQualityDesc = EID:getDescriptionEntry("CraftingBestQuality") - EID:appendToDescription(customDescObj, "Bag Quality: " .. bagQuality .. "#" .. bagResult .. "#") - EID:appendToDescription(customDescObj, "Best Quality: " .. bestQuality .. " " .. EID:tableToCraftingIconsFull(mostValuableSimp, false) .. "#" .. bestResult .. "#") + if (#EID.BagItems > 0) then EID:appendToDescription(customDescObj, bagQualityDesc .. " " .. bagQuality .. "#" .. bagResult .. "#") end + EID:appendToDescription(customDescObj, bestQualityDesc .. " " .. bestQuality .. "#{{Blank}} " .. tableToCraftingIcons(self,mostValuableSimp) .. "#" .. bestResult .. "#") EID:printDescription(customDescObj) return true @@ -1018,7 +1023,7 @@ function EID:handleBagOfCraftingRendering() if v[3] then customDescObj.Description = customDescObj.Description.." {{Collectible" .. v[3] .. "}} " end end - customDescObj.Description = customDescObj.Description..EID:tableToCraftingIconsMerged(v[1]) + customDescObj.Description = customDescObj.Description..tableToCraftingIcons(self,v[1]) prevItem = v[2] end end