Continue to refactor body/equipment positionings
This commit is contained in:
@@ -6,8 +6,6 @@ module Dodge.Equipment (
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Creature.HandPos
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Dodge.Data.World
|
||||
import Dodge.Item.Location
|
||||
import Dodge.Wall.Delete
|
||||
@@ -50,13 +48,12 @@ setWristShieldPos :: Item -> Creature -> World -> World
|
||||
setWristShieldPos itm cr w = w & moveWallIDUnsafe i wlline
|
||||
where
|
||||
i = _itParamID $ _itParams itm
|
||||
m = w ^. cWorld . lWorld . items
|
||||
wlline = (f (V3 (-10) 7 0), f (V3 10 7 0))
|
||||
invid = _ilInvID (_itLocation itm)
|
||||
handtrans = case cr ^? crInv . ix invid >>= \k -> w ^? cWorld . lWorld . items . ix k . itLocation . ilEquipSite . _Just of
|
||||
Just OnLeftWrist -> \cr' -> translatePointToLeftHand cr' . g
|
||||
_ -> translatePointToRightHand
|
||||
g
|
||||
| twists cr = (+.+.+ V3 (-5) 10 0)
|
||||
| otherwise = id
|
||||
f = (+.+ _crPos cr) . stripZ . rotate3 (_crDir cr) . handtrans cr
|
||||
Just x -> translateToES cr x -- . g
|
||||
_ -> undefined
|
||||
-- g
|
||||
-- | twists cr = (+.+.+ V3 (-5) 10 0)
|
||||
-- | otherwise = id
|
||||
f = (+.+ _crPos cr) . stripZ . rotate3 (_crDir cr) . handtrans
|
||||
|
||||
Reference in New Issue
Block a user