Complete PartiallyComposedItem -> ComposedItem
This commit is contained in:
@@ -174,7 +174,7 @@ invRootItemEffs cr =
|
||||
(reduceLocLDT (Endo . invItemLocUpdate) . LocLDT TopLDT)
|
||||
(invLDT (_crInv cr))
|
||||
|
||||
invItemLocUpdate :: LocationLDT ItemLink PartiallyComposedItem -> World -> World
|
||||
invItemLocUpdate :: LocationLDT ItemLink ComposedItem -> World -> World
|
||||
invItemLocUpdate loc w = case itm ^. itType of
|
||||
ATTACH BULLETSYNTH -> fromMaybe w $ do
|
||||
i <- itm ^? itLocation . ilInvID
|
||||
@@ -237,7 +237,7 @@ updateHeldRootItem cr = fromMaybe id $ do
|
||||
itmtree <- invRootTrees (_crInv cr) ^? ix invid
|
||||
return $ updateAttachedItems itmtree cr
|
||||
|
||||
updateAttachedItems :: LabelDoubleTree ItemLink PartiallyComposedItem -> Creature -> World -> World
|
||||
updateAttachedItems :: LabelDoubleTree ItemLink ComposedItem -> Creature -> World -> World
|
||||
updateAttachedItems itmtree cr =
|
||||
cldtPropagateFold
|
||||
chainLinkOrientation
|
||||
@@ -249,9 +249,9 @@ updateAttachedItems itmtree cr =
|
||||
-- need to check rotation
|
||||
chainLinkOrientation ::
|
||||
(Point3, Q.Quaternion Float) ->
|
||||
PartiallyComposedItem ->
|
||||
ComposedItem ->
|
||||
ItemLink ->
|
||||
PartiallyComposedItem ->
|
||||
ComposedItem ->
|
||||
(Point3, Q.Quaternion Float)
|
||||
chainLinkOrientation mo (par, _, _) (ILink lt f) (child, _, _) =
|
||||
(p + Q.rotate q p1, q * q1)
|
||||
@@ -262,7 +262,7 @@ chainLinkOrientation mo (par, _, _) (ILink lt f) (child, _, _) =
|
||||
updateItemWithOrientation ::
|
||||
Creature ->
|
||||
(Point3, Q.Quaternion Float) ->
|
||||
LocationLDT ItemLink PartiallyComposedItem ->
|
||||
LocationLDT ItemLink ComposedItem ->
|
||||
World ->
|
||||
World
|
||||
updateItemWithOrientation cr m loc@(LocLDT _ itmtree) =
|
||||
@@ -276,14 +276,14 @@ updateItemWithOrientation cr m loc@(LocLDT _ itmtree) =
|
||||
ci = itmtree ^. ldtValue
|
||||
itm = ci ^. _1
|
||||
|
||||
drawAugmentedHUD :: LocationLDT ItemLink PartiallyComposedItem -> World -> World
|
||||
drawAugmentedHUD :: LocationLDT ItemLink ComposedItem -> World -> World
|
||||
drawAugmentedHUD (LocLDT con _) w = fromMaybe w $ do
|
||||
itm <- con ^? cldtParent . _1
|
||||
return $ w & cWorld . lWorld . flares <>~ drawTargeting itm w
|
||||
|
||||
shineTargetLaser ::
|
||||
Creature ->
|
||||
LabelDoubleTree ItemLink PartiallyComposedItem ->
|
||||
LabelDoubleTree ItemLink ComposedItem ->
|
||||
(Point3, Q.Quaternion Float) ->
|
||||
World ->
|
||||
World
|
||||
@@ -325,7 +325,7 @@ shineTargetLaser cr itmtree (p, q) w = fromMaybe (w & pointittarg . itTgPos .~ N
|
||||
|
||||
shineTorch ::
|
||||
Creature ->
|
||||
LabelDoubleTree ItemLink PartiallyComposedItem ->
|
||||
LabelDoubleTree ItemLink ComposedItem ->
|
||||
(Point3, Q.Quaternion Float) ->
|
||||
World ->
|
||||
World
|
||||
|
||||
Reference in New Issue
Block a user