Replace length . _siPictures with _siHeight

This commit is contained in:
2025-01-05 17:31:37 +00:00
parent 27ffeb3a5a
commit 57d36855d8
4 changed files with 41 additions and 50 deletions
+4 -2
View File
@@ -5,6 +5,7 @@ module Dodge.Update.Input.InGame (
updateMouseInGame,
) where
import Dodge.Item.Display
import Control.Applicative
import Control.Monad
import Data.Foldable
@@ -240,8 +241,9 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
guard $ i == 0
str <-
fmap (take 5) $
w
^? hud . hudElement . diSections . ix i . ssItems . ix j . siPictures . ix 0
w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix j
>>= (listToMaybe . basicItemDisplay)
-- ^? hud . hudElement . diSections . ix i . ssItems . ix j . siPictures . ix 0
return . (worldEventFlags . at CombineInventoryChange ?~ ()) $
case w ^? hud . hudElement . subInventory . ciFilter . _Just of
Just (_ : xs)