Implement modules changing shell payloads
This commit is contained in:
@@ -67,6 +67,7 @@ shellMag =
|
||||
{ _magParams =
|
||||
ProjectileParams
|
||||
{ _ampPayload = ExplosionPayload
|
||||
-- { _ampPayload = ShrapnelBomb
|
||||
}
|
||||
, _magLoadStatus =
|
||||
ReloadStatus
|
||||
|
||||
@@ -73,6 +73,7 @@ showAttachItem t itm = case t of
|
||||
(itm ^? itUse . uaParams . apLinkedProjectile . _Just)
|
||||
HOMINGMODULE -> "HOMING MOD"
|
||||
AUGMENTEDHUD -> "AUGMENTED HUD"
|
||||
SHELLPAYLOAD x -> show x
|
||||
|
||||
showEquipItem :: EquipItemType -> String
|
||||
showEquipItem eit = case eit of
|
||||
|
||||
@@ -3,7 +3,7 @@ module Dodge.Item.Grammar (
|
||||
invAdj,
|
||||
invRootMap,
|
||||
invRootTrees,
|
||||
basePCI,
|
||||
baseCI,
|
||||
allInvLocs,
|
||||
) where
|
||||
|
||||
@@ -112,10 +112,11 @@ itemToFunction itm = case itm ^. itType of
|
||||
TARGETING{} -> WeaponTargetingSF
|
||||
EQUIP WRIST_ECG -> TriggerSF
|
||||
EQUIP{} -> EquipmentPlatformSF
|
||||
ATTACH SHELLPAYLOAD{} -> AmmoPayloadSF LauncherAmmo
|
||||
_ -> UncomposableIsolateSF
|
||||
|
||||
basePCI :: Item -> ComposedItem
|
||||
basePCI itm = (itm, itemToFunction itm, itemBaseConnections itm)
|
||||
baseCI :: Item -> ComposedItem
|
||||
baseCI itm = (itm, itemToFunction itm, itemBaseConnections itm)
|
||||
|
||||
itemBaseConnections :: Item -> LinkTest
|
||||
itemBaseConnections itm = case _itType itm of
|
||||
@@ -205,7 +206,7 @@ joinItemsInList f xs = snd $ h (xs, [])
|
||||
invLDT :: IM.IntMap Item -> [LabelDoubleTree ItemLink ComposedItem]
|
||||
invLDT =
|
||||
joinItemsInList tryAttachItems . IM.elems
|
||||
. fmap (singleLDT . basePCI)
|
||||
. fmap (singleLDT . baseCI)
|
||||
|
||||
-- this assumes the creature inventory is well formed, specifically the
|
||||
-- location ids
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
module Dodge.Item.Scope (
|
||||
shellModule,
|
||||
zoomScope,
|
||||
targetingScope,
|
||||
remoteScreen,
|
||||
@@ -38,6 +39,11 @@ bulletModule bm =
|
||||
& itType .~ BULLETMOD bm
|
||||
& itUse .~ UseBulletMod {_ubMod = bm}
|
||||
|
||||
shellModule :: Payload -> Item
|
||||
shellModule p = defaultHeldItem
|
||||
& itType .~ ATTACH (SHELLPAYLOAD p)
|
||||
& itUse .~ UseNothing
|
||||
|
||||
--bulletTargetingModule :: BulletTrajectoryType -> Item
|
||||
--bulletTargetingModule = bulletModule . BulletModTrajectory
|
||||
|
||||
|
||||
Reference in New Issue
Block a user