Fix combination bug with small inventories

This commit is contained in:
2022-03-04 00:11:36 +00:00
parent ae219f2ddf
commit 2961923534
3 changed files with 18 additions and 7 deletions
+2 -4
View File
@@ -48,12 +48,10 @@ lookupItemsUsingTrie ((mods,ct,i,n):xs) t = do
let is = replicate n' (mods,i)
concatMap (map (first (is ++)) . lookupItemsUsingTrie xs) $ maybeToList (_trieChildren t M.!? (n',ct))
invertListInvMult :: IM.IntMap Item
-> [[(M.Map ModuleSlot ItemModule,CombineType,Int,Int)]]
invertListInvMult :: IM.IntMap Item -> [[(M.Map ModuleSlot ItemModule,CombineType,Int,Int)]]
invertListInvMult = powlistUpToN 4 . invertListInv
invertListInv :: IM.IntMap Item
-> [(M.Map ModuleSlot ItemModule,CombineType,Int,Int)]
invertListInv :: IM.IntMap Item -> [(M.Map ModuleSlot ItemModule,CombineType,Int,Int)]
invertListInv = IM.foldrWithKey
(\k it -> ((_itModules it,_itType it, k, itStackAmount it) :) )
[]