Implement modules changing shell payloads
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user