Implement filter on nearby objects

This commit is contained in:
2023-02-17 11:19:07 +00:00
parent 93dfc2a67c
commit c0ef36426a
8 changed files with 103 additions and 18 deletions
+3 -2
View File
@@ -90,7 +90,8 @@ inventoryDisplay sss w cfig = listPicturesAtScaleOff
InInventory SortInventory -> negate 1
InInventory {} -> 0
SelNothing{} -> 1
SelCloseObject{} -> 2
InNearby SortNearby -> 2
InNearby{} -> 3
xint <- sss ^? sssSections . ix secnum . ssIndent
spos <- _sssSelPos sss
let y = sum . fmap (length . _ssShownItems) . fst . IM.split spos $ _sssSections sss
@@ -155,7 +156,7 @@ floorItemPickupInfo n itm
yourAugmentedItem :: (Item -> a) -> a -> (Either FloorItem Button -> a) -> World -> a
yourAugmentedItem f x g w = case you w ^? crManipulation . manObject of
Just (InInventory (SelItem i _)) -> f $ yourInv w ^?! ix i
Just (SelCloseObject i) -> g $ w ^?! hud . closeObjects . ix i
Just (InNearby (SelCloseObject i)) -> g $ w ^?! hud . closeObjects . ix i
_ -> x
drawNoSubInventory :: Configuration -> World -> Picture