Partially working change to selected items

This commit is contained in:
2023-02-07 12:07:13 +00:00
parent 5f7d662454
commit c354949ca9
27 changed files with 386 additions and 288 deletions
+5 -3
View File
@@ -11,10 +11,12 @@ youc :: CWorld -> Creature
youc w = w ^?! lWorld . creatures . ix 0
yourItem :: World -> Maybe Item
yourItem w = _crInv (you w) IM.!? crSel (you w)
yourItem w = do
i <- you w ^? crInvSel . isel . ispItem
_crInv (you w) IM.!? i
yourInv :: World -> IM.IntMap Item
yourInv = _crInv . you
yourInvSel :: World -> Int
yourInvSel = crSel . you
--yourInvSel :: World -> Int
--yourInvSel = crSel . you