Major item refactor, still broken
This commit is contained in:
+8
-6
@@ -33,15 +33,16 @@ useMagShield mt _ cr w =
|
||||
}
|
||||
|
||||
setWristShieldPos :: Item -> Creature -> EquipSite -> World -> World
|
||||
setWristShieldPos itm cr x = moveWallIDUnsafe i wlline
|
||||
setWristShieldPos itm cr x w = moveWallIDUnsafe i wlline w
|
||||
where
|
||||
m = w ^. cWorld . lWorld . items
|
||||
i = _itParamID $ _itParams itm
|
||||
wlline = (f (V3 (-10) 7 0), f (V3 10 7 0))
|
||||
handtrans = case x of
|
||||
OnLeftWrist -> \cr' -> translatePointToLeftHand cr' . g
|
||||
_ -> translatePointToRightHand
|
||||
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
|
||||
|
||||
@@ -53,9 +54,10 @@ setWristShieldPos itm cr x = moveWallIDUnsafe i wlline
|
||||
-- _ -> w
|
||||
|
||||
createHeadLamp :: Item -> Creature -> World -> World
|
||||
createHeadLamp _ cr =
|
||||
createHeadLamp _ cr w = w &
|
||||
cWorld . lWorld . lights
|
||||
.:~ LSParam
|
||||
((_crPos cr `v2z` 0) +.+.+ rotate3 (_crDir cr) (translatePointToHead cr (V3 5 0 3)))
|
||||
((_crPos cr `v2z` 0) +.+.+ rotate3 (_crDir cr)
|
||||
(translatePointToHead (w ^. cWorld . lWorld . items) cr (V3 5 0 3)))
|
||||
200
|
||||
0.7
|
||||
|
||||
Reference in New Issue
Block a user