Unify some item updates

This commit is contained in:
2025-07-08 23:20:25 +01:00
parent c2f234b842
commit 15187db999
3 changed files with 112 additions and 41 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ module Dodge.Item.HeldOffset (
handHandleOrient,
) where
import Dodge.DoubleTree
import Dodge.Data.AimStance
import Dodge.Data.ComposedItem
import Dodge.Data.Creature
@@ -55,7 +56,7 @@ handOrient cr = case cr ^. crStance . posture of
locOrient :: LocationLDT ItemLink OItem -> Creature -> Point3Q
locOrient loc cr =
handHandleOrient (fmap (\(x, y, _) -> (x, y)) loc) cr
handHandleOrient (fmap (\(x, y, _) -> (x, y)) $ locToTop loc) cr
`Q.comp` (loc ^. locLDT . ldtValue . _3)
heldItemOffset :: LocationLDT ItemLink CItem -> Creature -> Point3 -> Point3