This commit is contained in:
2022-07-27 12:49:23 +01:00
parent 6554d219dc
commit 8d17ce66e9
106 changed files with 2911 additions and 2678 deletions
+3 -3
View File
@@ -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)