Add remote detonator, stop remote screen attaching to nonlauncher ammo

This commit is contained in:
2024-12-25 21:52:09 +00:00
parent c788af47bd
commit ae557f3fd4
11 changed files with 180 additions and 164 deletions
+1
View File
@@ -247,6 +247,7 @@ inventoryX c = case c of
, megaShellMag
, homingModule
, remoteScreen
, remoteDetonator
, launcherX 3
, megaShellMag
, homingModule
+1 -1
View File
@@ -49,7 +49,7 @@ useSelectedItem crid w = (worldEventFlags . at InventoryChange ?~ ()) . fromMayb
useLocation :: LocationLDT ItemLink ComposedItem -> UseFocus
useLocation loc
| isJust $ loc ^? locLDT . ldtValue . _1 . itUse . uequipEffect = UseFromLocation
| isJust $ loc ^? locLDT . ldtValue . _1 . itUse . uaParams . apLinkedProjectile
| isJust $ loc ^? locLDT . ldtValue . _1 . itUse . uaParams . apLinkedProjectile . _Just
= UseFromLocation
| otherwise = UseFromRoot
+2
View File
@@ -22,6 +22,7 @@ data ComposeLinkType
| WeaponScopeLink
| WeaponTargetingLink
| RemoteScreenLink
| RemoteDetonatorLink
| AugmentedHUDLink
| FunctionChangeLink
| MakeAutoLink
@@ -37,6 +38,7 @@ data ItemStructuralFunction
| AugmentedHUDSF
| AmmoMagSF AmmoType
| RemoteScreenSF
| RemoteDetonatorSF
| UncomposableIsolateSF
| AmmoModifierSF AmmoType
| AmmoTargetingSF AmmoType
+1
View File
@@ -70,6 +70,7 @@ data AttachType
= ZOOMSCOPE
| BULLETSYNTH
| REMOTESCREEN
| REMOTEDETONATOR
| HOMINGMODULE
| AUGMENTEDHUD
| SHELLPAYLOAD {_shellPayload :: Payload}
-3
View File
@@ -16,7 +16,6 @@ module Dodge.Data.Item.Use (
module Dodge.Data.Item.BulletMod
) where
import Dodge.Data.Item.Effect
import Dodge.Data.Item.BulletMod
import Dodge.Data.Item.Scope
import Control.Lens
@@ -71,8 +70,6 @@ data TriggerType = AutoTrigger | HammerTrigger
data AttachParams
= APLinkProjectile
{_apLinkedProjectile :: Maybe Int}
| APItEffect
{_apItEffect :: ItEffect }
| APInt {_apInt :: Int}
| APNothing
deriving (Eq, Show, Read)
+1
View File
@@ -39,6 +39,7 @@ itemFromAttachType at = case at of
ZOOMSCOPE -> zoomScope
BULLETSYNTH -> bulletSynthesizer
REMOTESCREEN -> remoteScreen
REMOTEDETONATOR -> remoteDetonator
-- ROCKETHOMER -> rocketHomer
HOMINGMODULE -> homingModule
AUGMENTEDHUD -> augmentedHUD
+6
View File
@@ -71,6 +71,12 @@ showAttachItem t itm = case t of
mempty
show
(itm ^? itUse . uaParams . apLinkedProjectile . _Just)
REMOTEDETONATOR ->
"REM.DETONATOR"
++ maybe
mempty
show
(itm ^? itUse . uaParams . apLinkedProjectile . _Just)
HOMINGMODULE -> "HOMING MOD"
AUGMENTEDHUD -> "AUGMENTED HUD"
SHELLPAYLOAD x -> show x
+7 -2
View File
@@ -64,14 +64,18 @@ itemToBreakLists itm itmf = case (itm ^. itType, itmf) of
)
(_, AmmoMagSF{}) -> fromMaybe ([], []) $ do
atype <- itm ^? itConsumables . magType
let screenanddet = case atype of
LauncherAmmo -> [ (RemoteScreenSF, RemoteScreenLink)
, (RemoteDetonatorSF, RemoteDetonatorLink)
]
_ -> []
return
(
[ (AmmoModifierSF atype, AmmoModLink)
, (AmmoTargetingSF atype, AmmoTargetingLink)
, (AmmoPayloadSF atype, AmmoPayloadLink)
, (AmmoEffectSF atype, AmmoEffectLink)
, (RemoteScreenSF, RemoteScreenLink)
]
] <> screenanddet
, []
)
(_, WeaponTargetingSF) -> (getAmmoLinks itm ++ [(AugmentedHUDSF, AugmentedHUDLink)], [])
@@ -102,6 +106,7 @@ itemToFunction itm = case itm ^. itType of
AmmoMagSF amtype
AMMOMAG{} -> maybe UncomposableIsolateSF AmmoMagSF $ itm ^? itConsumables . magType
ATTACH REMOTESCREEN -> RemoteScreenSF
ATTACH REMOTEDETONATOR -> RemoteDetonatorSF
ATTACH BULLETSYNTH -> AmmoModifierSF BulletAmmo
ATTACH ZOOMSCOPE -> WeaponScopeSF
ATTACH HOMINGMODULE -> AmmoTargetingSF LauncherAmmo
+1
View File
@@ -18,6 +18,7 @@ itemInvColor ci = case ci ^. _2 of
AugmentedHUDSF -> rose
AmmoMagSF{} -> red
RemoteScreenSF -> azure
RemoteDetonatorSF -> azure
UncomposableIsolateSF -> greyN 0.5
AmmoModifierSF{} -> orange
AmmoTargetingSF{} -> green
+5
View File
@@ -3,6 +3,7 @@ module Dodge.Item.Scope (
zoomScope,
targetingScope,
remoteScreen,
remoteDetonator,
homingModule,
-- bulletTargetingModule,
augmentedHUD,
@@ -56,3 +57,7 @@ augmentedHUD = makeAttach AUGMENTEDHUD
remoteScreen :: Item
remoteScreen = makeAttach REMOTESCREEN
& itUse . uaParams .~ APLinkProjectile Nothing
remoteDetonator :: Item
remoteDetonator = makeAttach REMOTEDETONATOR
& itUse . uaParams .~ APLinkProjectile Nothing