Allow for custom reloading sounds

This commit is contained in:
2022-06-21 22:21:18 +01:00
parent 53c8be0679
commit 029b6daf8e
25 changed files with 339 additions and 219 deletions
+13 -1
View File
@@ -49,7 +49,7 @@ inventoryDisplay cfig w = listPicturesAt 0 0 cfig invlist
where
cr = you w
inv = _crInv cr
invlist = concatMap itemText (IM.elems inv)
invlist = concatMap (itemText' cr) (IM.toList inv)
++ displayFreeSlots
++ concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects w)
-- ++ map floorItemsColor (concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects w))
@@ -367,6 +367,18 @@ mapWall cfig w wl =
mainListCursor :: Color -> Int -> Configuration -> Picture
mainListCursor c = openCursorAt 120 c 5 0
itemText' :: Creature -> (Int,Item) -> [Picture]
{-# INLINE itemText' #-}
itemText' cr (i,it) = f $ case _itCurseStatus it of
UndroppableIdentified -> map (color yellow . text) (itemDisplay it)
_ | crSel cr == i -> map (color thecolor . text) (selectedItemDisplay cr it)
_ -> map (color thecolor . text) (itemDisplay it)
where
thecolor = _itInvColor it
f = take (itSlotsTaken it) . (++ replicate 10 (color (_itInvColor it) $ text "*"))
itemText :: Item -> [Picture]
{-# INLINE itemText #-}
itemText it = f $ case _itCurseStatus it of