Fix attachment of augmented hud to laser

This commit is contained in:
2024-10-08 17:36:00 +01:00
parent c0879393cd
commit d1ee0f997a
4 changed files with 5 additions and 5 deletions
+2 -3
View File
@@ -61,7 +61,6 @@ itemToBreakLists ci = case (itm ^. itType,ci ^. cItemFunction) of
, (RemoteScreenSF, RemoteScreenLink)
],[])
(_,WeaponTargetingSF) -> (getAmmoLinks itm ++ [(AugmentedHUDSF,AugmentedHUDLink)],[])
-- TARGETING{} -> ([(AugmentedHUDSF,AugmentedHUDLink)],[])
_ -> ([],[])
where
itm = ci ^. cItem
@@ -99,12 +98,12 @@ laserLinkTest :: Item -> LinkTest
laserLinkTest itm = LTest (llleft itm) (llright itm)
llleft :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
llleft itm pci = _tryLeftLink (uncurry useBreakL $ itemToBreakLists (CItem itm (itemToFunction itm))) pci
llleft itm pci = _tryLeftLink (uncurry useBreakL $ itemToBreakLists (CItem itm WeaponTargetingSF)) pci
llright :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
llright itm pci = case pci ^. _1 . itType of
CRAFT TRANSFORMER -> Just (toLasgunUpdate itm)
_ -> _tryRightLink (uncurry useBreakL $ itemToBreakLists (CItem itm (itemToFunction itm))) pci
_ -> _tryRightLink (uncurry useBreakL $ itemToBreakLists (CItem itm WeaponPlatformSF)) pci
toLasgunUpdate :: Item -> LinkUpdate
toLasgunUpdate itm = LUpdate (ILink FunctionChangeLink orientAttachment)