From 2abef7b52ca7e53e4e3edf3ce567a672f66dfd46 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Thu, 27 Jan 2022 01:12:34 -0500 Subject: [PATCH] Use new Tab ID system for achievement lock preview --- eid_bagofcrafting.lua | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index ff3cfd2c..09d374ee 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -830,21 +830,16 @@ function EID:handleBagOfCraftingRendering() --Display the result of the 8 items in our bag if (showCraftingResult or EID.Config["BagOfCraftingDisplayMode"] == "Preview Only") and #EID.BagItems >= 8 then local craftingResult, backupResult = EID:calculateBagOfCrafting(EID.BagItems) - if Input.IsActionPressed(ButtonAction.ACTION_MAP, EID.player.ControllerIndex) then - local descriptionObj = EID:getDescriptionObj(5, 100, backupResult) - descriptionObj.Description = getHotkeyString() .. descriptionObj.Description - EID:printDescription(descriptionObj) - return true - end + if (backupResult ~= craftingResult) then EID.TabPreviewID = backupResult end local descriptionObj = EID:getDescriptionObj(5, 100, craftingResult) - local infoText = EID:getDescriptionEntry("FlipItemToggleInfo") --prepend the Hide/Preview hotkeys to the description descriptionObj.Description = getHotkeyString() .. descriptionObj.Description - local backupObjName = EID:getObjectName(5, 100, backupResult) - if (backupResult ~= craftingResult) then + if (backupResult ~= craftingResult and descriptionObj.ObjSubType == craftingResult) then local backupDesc = EID:getDescriptionEntry("CraftingPreviewBackup") + local backupObjName = EID:getObjectName(5, 100, backupResult) + local tabText = EID:getDescriptionEntry("FlipItemToggleInfo") EID:appendToDescription(descriptionObj,"#" .. backupDesc .. "#{{Collectible" .. backupResult .. "}} " .. - backupObjName .. "#{{Blank}} " .. infoText) + backupObjName .. "#{{Blank}} " .. tabText) end EID:printDescription(descriptionObj) return true