Move targeting to dedicated datatype within item
This commit is contained in:
@@ -119,7 +119,9 @@ moduleCombinations =
|
||||
)
|
||||
]
|
||||
where
|
||||
makeDirectedTele it = it & itEffect .~ rbSetTarget
|
||||
makeDirectedTele it = it
|
||||
-- & itEffect .~ rbSetTarget
|
||||
& itTargeting' .~ targetRBPress
|
||||
& itUse . useMods .:~ withPosDirWallCheck directedTelPos
|
||||
-- for the camera: the simplest option is to remove all zoom/offset
|
||||
& itUse . useAim . aimZoom . itZoomFac .~ 1
|
||||
@@ -128,9 +130,7 @@ moduleCombinations =
|
||||
-- position
|
||||
directedTelPos it cr w = (p,a)
|
||||
where
|
||||
p = fromMaybe (_crPos cr) $ do
|
||||
(g,_) <- _itTargeting it
|
||||
g w
|
||||
p = fromMaybe (_crPos cr) $ it ^? itTargeting' . tgPos . _Just
|
||||
a = argV (mouseWorldPos w -.- p)
|
||||
f ameff = itConsumption . aoType . amBulEff .~ ameff
|
||||
amod cts str func = (cts,ItemModule [str] 1 func)
|
||||
|
||||
Reference in New Issue
Block a user