Cleanup, fix bug in floating camera zoom

This commit is contained in:
2024-12-23 16:59:55 +00:00
parent 90ec2a3738
commit 02b2f9831f
2 changed files with 5 additions and 6 deletions
+4 -5
View File
@@ -115,13 +115,12 @@ itemToFunction itm = case itm ^. itType of
_ -> UncomposableIsolateSF
basePCI :: Item -> ComposedItem
basePCI itm = case _itType itm of
_ -> (itm, itemToFunction itm, itemBaseConnections itm)
basePCI itm = (itm, itemToFunction itm, itemBaseConnections itm)
itemBaseConnections :: Item -> LinkTest
itemBaseConnections itm = case _itType itm of
HELD LASER -> laserLinkTest itm
CRAFT SPRING -> springLinkTest itm
CRAFT SPRING -> springLinkTest
_ -> uncurry useBreakL $ itemToBreakLists itm (itemToFunction itm)
laserLinkTest :: Item -> LinkTest
@@ -145,8 +144,8 @@ toLasgunUpdate itm =
(\(par, _, _) -> (par, HeldPlatformSF, uncurry useBreakL $ itemToBreakLists itm HeldPlatformSF))
(\(chi, _, up) -> (chi, FunctionChangeSF, up))
springLinkTest :: Item -> LinkTest
springLinkTest itm = LTest (const Nothing) $
springLinkTest :: LinkTest
springLinkTest = LTest (const Nothing) $
\ci -> case ci ^. _1 . itType of
CRAFT HARDWARE ->
Just
+1 -1
View File
@@ -64,7 +64,7 @@ translateFloatingCameraKeys theinput = (camCenter -~ thetran) . (camViewFrom -~
zoomFloatingCamera :: Input -> Camera -> Camera
zoomFloatingCamera theinput
| ButtonRight `M.member` (theinput ^. mouseButtons) =
camZoom *~ (39/40 ^^ negate (getSmoothScrollValue theinput))
camZoom *~ ((39/40) ^^ negate (getSmoothScrollValue theinput))
| otherwise = id
-- the 39/40 is taken from zoomSpeed