Migrate LDTs to DTs
This commit is contained in:
@@ -315,7 +315,7 @@ shineTargetLaser cr loc w = fromMaybe (w & pointittarg . itTgPos .~ Nothing) $ d
|
||||
, _lpType = TargetingLaser (_itID itm)
|
||||
}
|
||||
where
|
||||
o = locOrient loc cr
|
||||
o = locOrient (locLDTToLocDT loc) cr
|
||||
itmtree = loc ^. locLDT
|
||||
(p, q) = o `Q.comp` (V3 5 0 0, Q.qID)
|
||||
x = 1
|
||||
@@ -341,7 +341,7 @@ shineTorch cr loc = fromMaybe id $ do
|
||||
. (cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid . itConsumables . _Just -~ x)
|
||||
where
|
||||
itmtree = loc ^. locLDT
|
||||
(p, q) = locOrient loc cr
|
||||
(p, q) = locOrient (locLDTToLocDT loc) cr
|
||||
x = 10
|
||||
isammolink AmmoInLink{} = True
|
||||
isammolink _ = False
|
||||
|
||||
@@ -24,6 +24,7 @@ module Dodge.Creature.Test (
|
||||
crSafeDistFromTarg,
|
||||
) where
|
||||
|
||||
import Dodge.DoubleTree
|
||||
import Dodge.Item.Grammar
|
||||
import Dodge.Creature.Radius
|
||||
import Dodge.Data.Equipment.Misc
|
||||
@@ -97,7 +98,7 @@ crInAimStance as cr = crIsAiming cr && mitstance == Just as
|
||||
i <- cr ^? crManipulation . manObject . imRootSelectedItem
|
||||
--itm <- invRootTrees' (cr ^. crInv) ^? ix i
|
||||
itm <- fmap (fmap (\(a,b,_) -> (a,b))) $ invRootTrees (cr ^. crInv) ^? ix i
|
||||
return $ aimStance itm
|
||||
return $ aimStance $ ldtToDT itm
|
||||
--cr ^? crInv . ix i . itUse . heldAim . aimStance
|
||||
|
||||
oneH :: Creature -> Bool
|
||||
|
||||
Reference in New Issue
Block a user