From 5bc50eb903d2e41d2a6cbd6224e8907d40c1087e Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sat, 15 Jan 2022 01:39:53 -0500 Subject: [PATCH] Achievement-locked crafting results now use the Flip desc toggle --- eid_bagofcrafting.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index 7b30cead..eef5d236 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -836,14 +836,21 @@ 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 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 backupObj = EID:getDescriptionObj(5, 100, backupResult) + local backupObjName = EID:getObjectName(5, 100, backupResult) if (backupResult ~= craftingResult) then local backupDesc = EID:getDescriptionEntry("CraftingPreviewBackup") EID:appendToDescription(descriptionObj,"#" .. backupDesc .. "#{{Collectible" .. backupResult .. "}} " .. - EID:getObjectName(5, 100, backupResult) .. "#" .. backupObj.Description) + backupObjName .. "#{{Blank}} " .. infoText) end EID:printDescription(descriptionObj) return true