Use NewIntMap InvInt for crInv
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.Inventory.RBList (
|
||||
eqSiteToPositions,
|
||||
) where
|
||||
|
||||
import NewInt
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Dodge.Data.EquipType
|
||||
@@ -46,7 +47,7 @@ chooseFreeSite cr = fromMaybe 0 . findIndex hasnoequipment
|
||||
where
|
||||
hasnoequipment ep = isNothing $ cr ^? crEquipment . ix ep
|
||||
|
||||
getEquipmentAllocation :: Int -> World -> EquipmentAllocation
|
||||
getEquipmentAllocation :: NewInt InvInt -> World -> EquipmentAllocation
|
||||
getEquipmentAllocation invid w = fromMaybe DoNotMoveEquipment $ do
|
||||
esite <- you w ^? crInv . ix invid >>= \k -> w ^? cWorld . lWorld . items . ix k >>= equipType-- . itUse . uequipEffect . eeType
|
||||
i <-
|
||||
|
||||
Reference in New Issue
Block a user