Achievement-locked crafting results now use the Flip desc toggle

This commit is contained in:
Buurazu authored and GitHub committed 2022-01-15 01:39:53 -05:00
1 parent 93fc928ea3
commit 5bc50eb903
1 file changed
+9 -2
+9 -2
View File
@@ -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