From b665a77ba300cb23ab97baacd95b4661cfaff170 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 28 Jan 2022 16:53:47 -0500 Subject: [PATCH] fix no recipes mode --- eid_bagofcrafting.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index 8e456399..048035c3 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -269,10 +269,10 @@ function EID:simulateBagOfCrafting(componentsTable) {idx = 7, weight = compCounts[30] * 10, totalWeight = 0}, {idx = 8, weight = compCounts[6] * 10, totalWeight = 0}, {idx = 9, weight = compCounts[26] * 10, totalWeight = 0}, - {idx = 12, weight = compCounts[8] * 10}, totalWeight = 0, + {idx = 12, weight = compCounts[8] * 10, totalWeight = 0}, } if compCounts[9] + compCounts[2] + compCounts[13] + compCounts[16] == 0 then - table.insert(poolWeights, {idx = 26, weight = compCounts[24] * 10}) + table.insert(poolWeights, {idx = 26, weight = compCounts[24] * 10, totalWeight = 0}) end local totalWeight = 0 @@ -751,6 +751,8 @@ local function getFloorItemsString(showPreviews, roomItems) return floorString end +--local function + function EID:handleBagOfCraftingRendering() local curSeed = game:GetSeeds():GetStartSeed() --reset our calculated recipes when the game seed changes