Improve carriage/stride when falling down pit

This commit is contained in:
2026-03-27 00:33:19 +00:00
parent fed607681b
commit ac09ed6629
7 changed files with 119 additions and 109 deletions
+5 -1
View File
@@ -20,6 +20,7 @@ module Dodge.Inventory (
collectInvItems,
shiftInvItemsUp,
shiftInvItemsDown,
closeItemDist,
) where
import Control.Monad
@@ -142,9 +143,12 @@ updateCloseObjects w =
x <- lw ^? terminals . ix tid . tmStatus
return (x /= TerminalDeactivated)
_ -> True
isclose x = dist y x < 30 && hasButtonLOS y x w
isclose x = dist y x < closeItemDist && hasButtonLOS y x w
y = you w ^. crPos . _xy
closeItemDist :: Float
closeItemDist = 30
changeSwapSelSet :: Int -> World -> World
changeSwapSelSet yi w
| yi >= 0 = foldl' (&) w $ replicate yi (swapSelSet shiftSetUp)