Tweaks concerning item types
This commit is contained in:
@@ -53,7 +53,7 @@ itemToBreakLists ::
|
||||
([(ItemStructuralFunction, ComposeLinkType)], [(ItemStructuralFunction, ComposeLinkType)])
|
||||
itemToBreakLists itm itmf = case (itm ^. itType, itmf) of
|
||||
(HELD TORCH, _) -> (getAmmoLinks itm, [])
|
||||
(_, WeaponPlatformSF) ->
|
||||
(_, HeldPlatformSF) ->
|
||||
( getAmmoLinks itm
|
||||
, [(WeaponTargetingSF, WeaponTargetingLink), (WeaponScopeSF, WeaponScopeLink)]
|
||||
)
|
||||
@@ -83,7 +83,7 @@ getAmmoLinks itm =
|
||||
itemToFunction :: Item -> ItemStructuralFunction
|
||||
itemToFunction itm = case itm ^. itType of
|
||||
HELD LASER -> WeaponTargetingSF
|
||||
HELD{} -> WeaponPlatformSF
|
||||
HELD{} -> HeldPlatformSF
|
||||
AMMOMAG{} -> maybe UncomposableIsolateSF AmmoMagSF $ itm ^? itUse . amagType
|
||||
ATTACH REMOTESCREEN -> RemoteScreenSF
|
||||
ATTACH BULLETSYNTH -> AmmoModifierSF BulletAmmo
|
||||
@@ -125,7 +125,7 @@ toLasgunUpdate :: Item -> LinkUpdate
|
||||
toLasgunUpdate itm =
|
||||
LUpdate
|
||||
(ILink FunctionChangeLink orientAttachment)
|
||||
(\(par, _, _) -> (par, WeaponPlatformSF, uncurry useBreakL $ itemToBreakLists itm WeaponPlatformSF))
|
||||
(\(par, _, _) -> (par, HeldPlatformSF, uncurry useBreakL $ itemToBreakLists itm HeldPlatformSF))
|
||||
(\(chi, _, up) -> (chi, FunctionChangeSF, up))
|
||||
|
||||
--itemLinkTestLeft :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
|
||||
|
||||
Reference in New Issue
Block a user