Major item refactor, still broken
This commit is contained in:
@@ -50,12 +50,13 @@ 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 . itLocation . ilEquipSite . _Just of
|
||||
Just OnLeftWrist -> \cr' -> translatePointToLeftHand cr' . g
|
||||
_ -> translatePointToRightHand
|
||||
handtrans = case cr ^? crInv . ix invid >>= \k -> w ^? cWorld . lWorld . items . ix k . itLocation . ilEquipSite . _Just of
|
||||
Just OnLeftWrist -> \cr' -> translatePointToLeftHand m cr' . g
|
||||
_ -> translatePointToRightHand m
|
||||
g
|
||||
| twists cr = (+.+.+ V3 (-5) 10 0)
|
||||
| twists m cr = (+.+.+ V3 (-5) 10 0)
|
||||
| otherwise = id
|
||||
f = (+.+ _crPos cr) . stripZ . rotate3 (_crDir cr) . handtrans cr
|
||||
|
||||
Reference in New Issue
Block a user