From de686bd8bc68476532396a9659b8fae22ad216c1 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Thu, 13 Jan 2022 22:45:21 -0500 Subject: [PATCH] Reduce EID:getDescriptionObj calls --- eid_bagofcrafting.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index f8a130b8..ba3bfa9e 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -784,9 +784,6 @@ function EID:handleBagOfCraftingRendering() local tableToCraftingIconsFunc = EID.tableToCraftingIconsMerged if EID.Config["BagOfCraftingDisplayIcons"] then tableToCraftingIconsFunc = EID.tableToCraftingIconsFull end - local customDescObj = EID:getDescriptionObj(5, 100, 710) - customDescObj.Description = "" - --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 @@ -885,6 +882,9 @@ function EID:handleBagOfCraftingRendering() --sort by ingredient quality table.sort(itemQuery, qualitySort) + local customDescObj = EID:getDescriptionObj(5, 100, 710) + customDescObj.Description = "" + --No Recipes Mode display if EID.Config["BagOfCraftingDisplayMode"] == "Pickups Only" then EID:appendToDescription(customDescObj, getHotkeyString())