remove redundant checks

This commit is contained in:
Buurazu authored and GitHub committed 2021-11-16 11:22:55 -05:00
1 parent d25a779b7d
commit b1b4c53d9e
1 file changed
+5 -7
+5 -7
View File
@@ -442,7 +442,7 @@ local function shiftBagContent()
EID.BagItems = newContent EID.BagItems = newContent
end end
-- only Tainted Cain's consumable slot bag can have its ingredients shifted -- only Tainted Cain's consumable slot bag can have its ingredients shifted... probably?
local function detectBagContentShift() local function detectBagContentShift()
if Input.IsActionTriggered(ButtonAction.ACTION_DROP, EID.player.ControllerIndex) and IsTaintedCain() then if Input.IsActionTriggered(ButtonAction.ACTION_DROP, EID.player.ControllerIndex) and IsTaintedCain() then
shiftBagContent() shiftBagContent()
@@ -653,12 +653,10 @@ function EID:handleBagOfCraftingRendering()
local calcResults = {} local calcResults = {}
for k, v in pairs(randResults) do for k, v in pairs(randResults) do
local resultID, lockedAchievementID = EID:calculateBagOfCrafting(v) local resultID, lockedAchievementID = EID:calculateBagOfCrafting(v)
if resultID > 0 then if resultID ~= lockedAchievementID then
if (not EID:isCollectibleUnlockedAnyPool(resultID) and resultID ~= lockedAchievementID) then table.insert(calcResults, {v, resultID, lockedAchievementID})
table.insert(calcResults, {v, resultID, lockedAchievementID}) else
else table.insert(calcResults, {v, resultID})
table.insert(calcResults, {v, resultID})
end
end end
end end
calcResultCache[queryString] = calcResults calcResultCache[queryString] = calcResults