Files
loop/src/Dodge/Base/Item.hs
T

28 lines
652 B
Haskell

module Dodge.Base.Item
(
) where
--import Dodge.Data
--import Dodge.Base.You
--import LensHelp
--
--import qualified IntMapHelp as IM
--selectedObject :: World -> Maybe (Either FloorItem Button)
--selectedObject w = lookup (_crInvSel ycr) $ zip [n..] $ _closeObjects w
-- where
-- ycr = you w
-- n = length $ _crInv ycr
--
--crItem :: World -> Int -> Item
--crItem w cid = _crInv cr IM.! _crInvSel cr
-- where
-- cr = _creatures w IM.! cid
--
--yourItemRef
-- :: Applicative f
-- => World
-- -> (Item -> f Item)
-- -> World
-- -> f World
--yourItemRef w = creatures . ix (_yourID w) . crInv . ix (_crInvSel (you w))