Cleanup, fix broken records in LeftUse

This commit is contained in:
2024-10-03 10:34:17 +01:00
parent e88b3c7443
commit 1953fb2d0c
19 changed files with 71 additions and 114 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ moveZoomCamera cfig theinput cr w campos =
wallZoom = min4 (campos ^. camBoundDist)
min4 (a, b, c, d) = minimum [hh / maxd a, hh / maxd (- b), hw / maxd c, hw / maxd (- d)]
maxd = max distFromEqmnt
distFromEqmnt = foldl' max 1 $ IM.mapMaybe (_eeViewDist . _equipEffect . _itUse) $ getCrEquipment cr
distFromEqmnt = foldl' max 1 $ IM.mapMaybe (_eeViewDist . _uequipEffect . _itUse) $ getCrEquipment cr
hw = halfWidth cfig
hh = halfHeight cfig
-- these speeds are inverted, larger means slower
+1 -1
View File
@@ -48,7 +48,7 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
where
rbscrollmax = fromMaybe 1 $ do
invid <- you w ^? crManipulation . manObject . imSelectedItem
esite <- you w ^? crInv . ix invid . itUse . equipEffect . eeSite
esite <- you w ^? crInv . ix invid . itUse . uequipEffect . eeSite
return $ length $ equipSiteToPositions esite
y = fromIntegral yi
numLocs = (fst . IM.findMax $ (w ^. cWorld . lWorld . seenLocations)) + 1