Implement targeting launcher shells using separate item
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user