Move towards a non-stacking inventory
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
module Dodge.Combine.Combinations
|
||||
( itemCombinations
|
||||
, flatItemCombinations
|
||||
, bulletWeapons
|
||||
) where
|
||||
|
||||
import Data.Bifunctor
|
||||
import Dodge.Item.Ammo
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Item
|
||||
@@ -44,6 +46,11 @@ magazineCombinations =
|
||||
po xs it = (map o xs, it)
|
||||
o = (1,)
|
||||
|
||||
flatItemCombinations :: [([ItemBaseType], Item)]
|
||||
flatItemCombinations = map (over _1 (concatMap f)) itemCombinations
|
||||
where
|
||||
f (x,it) = replicate (_getItAmount x) it
|
||||
|
||||
itemCombinations :: [([(ItAmount, ItemBaseType)], Item)]
|
||||
itemCombinations =
|
||||
watchCombinations ++
|
||||
|
||||
Reference in New Issue
Block a user