Implement targeting launcher shells using separate item

This commit is contained in:
2024-09-29 16:24:26 +01:00
parent 7d72fa3c5d
commit 88c3e02459
36 changed files with 747 additions and 610 deletions
+4 -2
View File
@@ -16,7 +16,7 @@ import Dodge.Module
import LensHelp
import Padding
canAttachTargeting :: TargetType -> Item -> Bool
canAttachTargeting :: TargetingType -> Item -> Bool
canAttachTargeting TARGETLASER _ = True
canAttachTargeting _ itm =
isJust (itm ^? itType . iyModules . ix ModBulletTrajectory . imtBulletTrajectoryType)
@@ -70,11 +70,12 @@ itemBaseName itm = case _iyBase $ _itType itm of
CONSUMABLE cit -> show cit
ATTACH ait -> showAttachItem ait itm
AMMOMAG ait -> show ait
TARGETING tt -> show tt
showAttachItem :: AttachType -> Item -> String
showAttachItem t itm = case t of
ZOOMSCOPE -> "ZOOMSCOPE"
TARGETATTACH x -> show x
-- TARGETATTACH x -> show x
BULLETSYNTHESIZER -> "BSYNTH"
REMOTESCREEN -> "REMOTE SCREEN " ++ show (itm ^? itUse . atLinkedProjectile . _Just)
HOMINGMODULE -> "HOMING MOD"
@@ -119,6 +120,7 @@ itemNumberDisplay cr itm = case iu of
AmmoMagUse {} -> [showLoadedAmount itm]
ScopeUse OpticScope {_opticZoom = x} -> [show x]
ScopeUse {} -> []
TargetingUse {_tgPos = mp} -> [maybe "" show mp]
-- this could be cleaner here...
where
iu = itm ^?! itUse