Commit before perhaps rethinking item structure
This commit is contained in:
@@ -17,6 +17,7 @@ import Dodge.DoubleTree
|
||||
import Dodge.Item.Orientation
|
||||
import LensHelp
|
||||
import ListHelp
|
||||
import qualified Data.Set as S
|
||||
|
||||
tryAttachItems ::
|
||||
LabelDoubleTree ItemLink ComposedItem ->
|
||||
@@ -108,7 +109,7 @@ itemToFunction itm = case itm ^. itType of
|
||||
| Just amtype <- itm ^? itConsumables . magType
|
||||
, Just _ <- itm ^? itLocation . ilEquipSite . _Just ->
|
||||
AmmoMagSF amtype
|
||||
AMMOMAG{} -> maybe UncomposableIsolateSF AmmoMagSF $ itm ^? itConsumables . magType
|
||||
AMMOMAG{} -> maybe NoSF AmmoMagSF $ itm ^? itConsumables . magType
|
||||
ATTACH REMOTESCREEN -> RemoteScreenSF
|
||||
ATTACH JOYSTICK -> JoystickSF
|
||||
ATTACH REMOTEDETONATOR -> RemoteDetonatorSF
|
||||
@@ -124,7 +125,12 @@ itemToFunction itm = case itm ^. itType of
|
||||
EQUIP WRIST_ECG -> TriggerSF
|
||||
EQUIP{} -> EquipmentPlatformSF
|
||||
ATTACH SHELLPAYLOAD{} -> AmmoPayloadSF LauncherAmmo
|
||||
_ -> UncomposableIsolateSF
|
||||
_ -> NoSF
|
||||
|
||||
structureToPotentialFunction
|
||||
:: LabelDoubleTree ComposedItem ItemLink
|
||||
-> S.Set ItemStructuralFunction
|
||||
structureToPotentialFunction _ = mempty
|
||||
|
||||
baseCI :: Item -> ComposedItem
|
||||
baseCI itm = (itm, itemToFunction itm, itemBaseConnections itm)
|
||||
|
||||
Reference in New Issue
Block a user