Reduce EID:getDescriptionObj calls

This commit is contained in:
Buurazu authored and GitHub committed 2022-01-13 22:45:21 -05:00
1 parent 7815aeaaff
commit de686bd8bc
1 file changed
+3 -3
+3 -3
View File
@@ -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())