Use NewIntMap InvInt for crInv
This commit is contained in:
@@ -132,8 +132,8 @@ copierItemUpdate itm cr w = fromMaybe w $ do
|
||||
x <- itm ^? itScroll . itsInt
|
||||
invid <- itm ^? itLocation . ilInvID
|
||||
ip <- itm ^? itType . ibtPathing
|
||||
i <- getInventoryPath x ip invid cr
|
||||
itm' <- cr ^? crInv . ix i >>= \k -> w ^? cWorld . lWorld . items . ix k
|
||||
i <- getInventoryPath x ip (_unNInt invid) cr
|
||||
itm' <- cr ^? crInv . ix (NInt i) >>= \k -> w ^? cWorld . lWorld . items . ix k
|
||||
v <- getItemValue itm' w cr
|
||||
return $ w & pointerToItem itm . itUse . uValue .~ v
|
||||
|
||||
@@ -170,7 +170,7 @@ trySynthBullet loc w = fromMaybe w $ do
|
||||
if x < 100
|
||||
then do
|
||||
bat <- loc ^? locDT . dtLeft . ix 0 . dtValue . _1
|
||||
j <- bat ^? itLocation . ilInvID
|
||||
j <- bat ^? itID . unNInt
|
||||
y <- bat ^. itConsumables
|
||||
guard $ y > 0
|
||||
return $ w
|
||||
|
||||
Reference in New Issue
Block a user