Move towards removing functionality associated with ItemLinks
This commit is contained in:
@@ -293,7 +293,8 @@ drawARHUD (LocLDT con _) w = fromMaybe w $ do
|
||||
shineTargetLaser :: Creature -> LocationLDT ItemLink OItem -> World -> World
|
||||
shineTargetLaser cr loc w = fromMaybe (w & pointittarg . itTgPos .~ Nothing) $ do
|
||||
guard (crIsAiming cr)
|
||||
(_, mag) <- find (isammolink . fst) (itmtree ^. ldtLeft)
|
||||
-- (_, mag) <- find (isammolink . fst) (itmtree ^. ldtLeft)
|
||||
(_, mag) <- find (isammolink . (^. _2 . ldtValue . _2)) (itmtree ^. ldtLeft)
|
||||
i <- mag ^. ldtValue . _1 . itConsumables
|
||||
guard $ i >= x
|
||||
maginvid <- mag ^? ldtValue . _1 . itLocation . ilInvID
|
||||
@@ -319,7 +320,7 @@ shineTargetLaser cr loc w = fromMaybe (w & pointittarg . itTgPos .~ Nothing) $ d
|
||||
itmtree = loc ^. locLDT
|
||||
(p, q) = o `Q.comp` (V3 5 0 0, Q.qID)
|
||||
x = 1
|
||||
isammolink AmmoInLink{} = True
|
||||
isammolink AmmoMagSF{} = True
|
||||
isammolink _ = False
|
||||
pos = _crPos cr + xyV3 (rotate3 cdir p)
|
||||
cdir = _crDir cr
|
||||
@@ -331,7 +332,7 @@ shineTargetLaser cr loc w = fromMaybe (w & pointittarg . itTgPos .~ Nothing) $ d
|
||||
|
||||
shineTorch :: Creature -> LocationLDT ItemLink OItem -> World -> World
|
||||
shineTorch cr loc = fromMaybe id $ do
|
||||
(_, mag) <- find (isammolink . fst) (itmtree ^. ldtLeft)
|
||||
(_, mag) <- find (isammolink . (^. _2 . ldtValue . _2)) (itmtree ^. ldtLeft)
|
||||
i <- mag ^. ldtValue . _1 . itConsumables
|
||||
guard $ crIsAiming cr
|
||||
guard $ i >= x
|
||||
@@ -343,7 +344,7 @@ shineTorch cr loc = fromMaybe id $ do
|
||||
itmtree = loc ^. locLDT
|
||||
(p, q) = locOrient (locLDTToLocDT loc) cr
|
||||
x = 10
|
||||
isammolink AmmoInLink{} = True
|
||||
isammolink AmmoMagSF{} = True
|
||||
isammolink _ = False
|
||||
pos = _crPos cr `v2z` 0 + rotate3 cdir (p + Q.rotate q (V3 8 0 1.5))
|
||||
cdir = _crDir cr
|
||||
|
||||
Reference in New Issue
Block a user