diff --git a/src/Dodge/Creature/Picture.hs b/src/Dodge/Creature/Picture.hs index c91e374fd..2c0ff0be6 100644 --- a/src/Dodge/Creature/Picture.hs +++ b/src/Dodge/Creature/Picture.hs @@ -139,4 +139,6 @@ shoulderSH = translateSHz 20 drawEquipment :: Creature -> SPic {-# INLINE drawEquipment #-} -drawEquipment cr = foldMap (itemEquipPict cr . fmap (\(a, b, _) -> CItem a b)) (invLDT $ _crInv cr) +drawEquipment cr = foldMap + (itemEquipPict cr . fmap (\(a, b, _) -> CItem a b)) + (invLDT $ _crInv cr) diff --git a/src/Dodge/DisplayInventory.hs b/src/Dodge/DisplayInventory.hs index 8f0a2f6ec..b3d1122db 100644 --- a/src/Dodge/DisplayInventory.hs +++ b/src/Dodge/DisplayInventory.hs @@ -308,7 +308,6 @@ updateSection indent mcsel sis availablelines oldoffset = SelectionSection { _ssItems = sis , _ssOffset = offset --- , _ssShownItems = tweakfirst shownitems , _ssShownItems = tweakfirst . tweaklast . map snd $ take availablelines shownstrings , _ssIndent = indent @@ -334,22 +333,11 @@ updateSection indent mcsel sis availablelines oldoffset = tweakfirst | offset > 0 = ix 0 .~ color moreupcolor (text (replicate 15 (toEnum 30))) | otherwise = id --- tweakfirst (x : xs) --- | offset > 0 = --- color moreupcolor (text (replicate 15 (toEnum 30))) : --- xs --- | otherwise = x : xs --- tweakfirst [] = [] moreupcolor = fromMaybe white $ allstrings ^? ix offset . _1 tweaklast | length shownstrings > availablelines = ix (availablelines - 1) .~ color moredowncolor (text . replicate 15 $ toEnum 31) | otherwise = id --- shownitems --- | length shownstrings > availablelines = --- map snd (take (availablelines - 1) shownstrings) --- ++ [color moredowncolor . text $ replicate 15 (toEnum 31)] --- | otherwise = map snd shownstrings moredowncolor = fromMaybe white $ allstrings ^? ix (offset + availablelines - 1) . _1 allstrings = listSelectionColorPicture sis shownstrings = drop offset allstrings diff --git a/src/Dodge/Item/Display.hs b/src/Dodge/Item/Display.hs index 08135c4e7..87732ee71 100644 --- a/src/Dodge/Item/Display.hs +++ b/src/Dodge/Item/Display.hs @@ -62,7 +62,8 @@ showAttachItem :: AttachType -> Item -> String showAttachItem t itm = case t of ZOOMSCOPE -> "ZOOMSCOPE" BULLETSYNTH -> "BSYNTH" - REMOTESCREEN -> "REMOTE SCREEN " ++ show (itm ^? itUse . uaParams . apLinkedProjectile . _Just) + REMOTESCREEN -> "REMOTE SCREEN " ++ maybe mempty show + (itm ^? itUse . uaParams . apLinkedProjectile . _Just) HOMINGMODULE -> "HOMING MOD" AUGMENTEDHUD -> "AUGMENTED HUD"