Cleanup
This commit is contained in:
@@ -20,7 +20,7 @@ import Control.Applicative
|
||||
-- assumes all item locations inside the items are correct
|
||||
tryGetRootAttachedFromInvID :: Int -> IM.IntMap Item -> Maybe (Int, IS.IntSet)
|
||||
tryGetRootAttachedFromInvID invid im = do
|
||||
let imroots = invRootMap' im
|
||||
let imroots = invRootMap im
|
||||
theroot = fromMaybe invid $ imroots ^? ix invid . _1 . _Just
|
||||
t <- imroots ^? ix theroot . _2
|
||||
--return (theroot, foldMap (IS.singleton . (^?! _1 . itLocation . ilInvID)) t)
|
||||
@@ -31,7 +31,7 @@ tryGetRootAttachedFromInvID invid im = do
|
||||
-- location ids
|
||||
tryGetRootItemInvID :: Int -> Creature -> Maybe Int
|
||||
tryGetRootItemInvID i cr = do
|
||||
let adj = case invAdj' (_crInv cr) of
|
||||
let adj = case invAdj (_crInv cr) of
|
||||
Left str -> error $ "tryToGetRootItemInvID: "++ str
|
||||
Right x -> x
|
||||
theroot <- adj ^? ix i
|
||||
|
||||
Reference in New Issue
Block a user