Cleanup
This commit is contained in:
@@ -19,7 +19,7 @@ data CombClust
|
||||
| JoinClust
|
||||
deriving (Eq,Ord,Show,Enum,Bounded)
|
||||
|
||||
newtype CombNode = CombNode {_unCombNode :: Either ItemBaseType [(IcAmount,ItemBaseType)]}
|
||||
newtype CombNode = CombNode {_unCombNode :: Either ItemBaseType [(ItAmount,ItemBaseType)]}
|
||||
deriving (Eq,Ord,Show)
|
||||
|
||||
instance Labellable CombNode where
|
||||
@@ -32,7 +32,7 @@ instance Labellable CombEdge where
|
||||
toLabelValue (CombEdge 0) = StrLabel (pack "")
|
||||
toLabelValue (CombEdge x) = StrLabel (pack $ show x)
|
||||
|
||||
bulletCombinations :: [([(IcAmount,ItemBaseType)],Item)]
|
||||
bulletCombinations :: [([(ItAmount,ItemBaseType)],Item)]
|
||||
bulletCombinations = filter
|
||||
( (`elem` map totype bulletWeapons)
|
||||
. totype
|
||||
@@ -63,7 +63,7 @@ itemCombinationsEdges = concatMap (f . over _2 (_iyBase . _itType)) itemCombinat
|
||||
| otherwise = (CombNode $ Right abts,CombNode $ Left bt,0) : map g abts
|
||||
where
|
||||
bts = map snd abts
|
||||
g (am,bt') = (CombNode $ Left bt',CombNode $ Right abts,_toInt am)
|
||||
g (am,bt') = (CombNode $ Left bt',CombNode $ Right abts,_getItAmount am)
|
||||
|
||||
combinationsGraph :: FGL.Gr CombNode CombEdge
|
||||
combinationsGraph = FGL.labnfilter (f . _unCombNode . snd)
|
||||
|
||||
Reference in New Issue
Block a user