Fix combination bug with small inventories
This commit is contained in:
@@ -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) :) )
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user