Cleanup, improve aiming code

This commit is contained in:
2025-05-31 15:28:30 +01:00
parent 3553ee5bbf
commit 8b07fffa7c
6 changed files with 107 additions and 93 deletions
-2
View File
@@ -33,14 +33,12 @@ useItemLoc ::
useItemLoc cr loc pt w
| HeldPlatformSF <- sf
, fromMaybe False $ loc ^? locLDT . ldtValue . _1 . itLocation . ilIsRoot
-- , cr ^. crStance . posture == Aiming =
, Aiming {} <- cr ^. crStance . posture =
return $ heldEffect pt (bimap _iatType (^. _1) ldt) cr w
| GadgetPlatformSF <- sf =
return $ gadgetEffect pt loc cr w
| UnderBarrelPlatformSF <- sf
, fromMaybe False $ loc ^? locLDT . ldtValue . _1 . itLocation . ilIsAttached
-- , cr ^. crStance . posture == Aiming =
, Aiming {} <- cr ^. crStance . posture =
return $ heldEffect pt (bimap _iatType (^. _1) ldt) cr w
| RemoteDetonatorSF <- sf