Cleanup, add a slight border to ideal camera zoom

This commit is contained in:
2025-08-31 11:47:45 +01:00
parent 2a0e6d1e6e
commit 291a35f538
3 changed files with 16 additions and 8 deletions
+2 -1
View File
@@ -19,7 +19,8 @@ import Dodge.Item.Location
useItem :: Int -> Int -> World -> Maybe World
useItem invid pt w = fmap (worldEventFlags . at InventoryChange ?~ ()) $ do
cr <- w ^? cWorld . lWorld . creatures . ix 0
itmloc <- invIndents ((\k -> w ^?! cWorld . lWorld . items . ix k) <$> _crInv cr) ^? ix invid . _2
itmloc <- invIndents ((\k -> w ^?! cWorld . lWorld . items . ix k) <$> _crInv cr)
^? ix invid . _2
useItemLoc cr itmloc pt w
useItemLoc :: Creature -> LocationDT OItem -> Int -> World -> Maybe World