Flatten values in creature manipulation data types
This commit is contained in:
@@ -226,7 +226,7 @@ shootTractorBeam _ cr w = w & cWorld . lWorld . tractorBeams .:~ tractorBeamAt'
|
||||
dir = _crDir cr
|
||||
outpos = fst $ collidePointWallsFilter (const True) cpos xpos w
|
||||
power = _attractionPower . _itParams $ _crInv cr IM.! itRef
|
||||
itRef = cr ^?! crManipulation . manObject . inInventory . imRootItem -- unsafe!! TODO change
|
||||
itRef = cr ^?! crManipulation . manObject . imRootItem -- unsafe!! TODO change
|
||||
|
||||
tractorBeamAt' :: Point2 -> Point2 -> Float -> Point2 -> TractorBeam
|
||||
tractorBeamAt' pos outpos dir power =
|
||||
@@ -471,7 +471,8 @@ shootTeslaArc itm cr mz w =
|
||||
w'
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix itRef . itParams .~ ip
|
||||
where
|
||||
itRef = cr ^?! crManipulation . manObject . inInventory . imRootItem -- unsafe!! TODO change
|
||||
-- use items item location instead
|
||||
itRef = cr ^?! crManipulation . manObject . imRootItem -- unsafe!! TODO change
|
||||
(w', ip) = makeTeslaArc (_itParams itm) pos dir w
|
||||
pos = _crPos cr + rotateV (_crDir cr) (_mzPos mz + aimingWeaponZeroPos cr itm)
|
||||
dir = _crDir cr + _mzRot mz
|
||||
|
||||
Reference in New Issue
Block a user