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
+1 -1
View File
@@ -1 +1 @@
All good (597 modules, at 17:07:08) All good (597 modules, at 17:30:07)
+1
View File
@@ -282,6 +282,7 @@ testInventory =
stackedInventory :: [Item] stackedInventory :: [Item]
stackedInventory = stackedInventory =
[ torch [ torch
, augmentedHUD
, smallBattery , smallBattery
, makeTypeCraft TRANSFORMER , makeTypeCraft TRANSFORMER
, remoteScreen , remoteScreen
+1 -1
View File
@@ -96,7 +96,7 @@ itemNumberDisplay :: Creature -> ComposedItem -> [String]
itemNumberDisplay cr ci = case (ci ^. cItemFunction,iu) of itemNumberDisplay cr ci = case (ci ^. cItemFunction,iu) of
-- UseTargeting {_tgPos = mp} -> [maybe "" shortShow mp] -- UseTargeting {_tgPos = mp} -> [maybe "" shortShow mp]
-- this could be cleaner here... -- this could be cleaner here...
(WeaponTargetingSF,_) -> [maybe "" shortShow (itm ^? itTargeting . itTgPos . _Just)] (WeaponTargetingSF,_) -> [maybe "" (const "!TARG!") (itm ^? itTargeting . itTgPos . _Just)]
(_,UseHeld{}) -> [] (_,UseHeld{}) -> []
(_,UseHotkey{}) -> [showAutoRechargeProgress (_leftConsumption iu)] (_,UseHotkey{}) -> [showAutoRechargeProgress (_leftConsumption iu)]
(_,UseEquip{}) -> showEquipmentNumber cr itm (_,UseEquip{}) -> showEquipmentNumber cr itm
+2 -3
View File
@@ -61,7 +61,6 @@ itemToBreakLists ci = case (itm ^. itType,ci ^. cItemFunction) of
, (RemoteScreenSF, RemoteScreenLink) , (RemoteScreenSF, RemoteScreenLink)
],[]) ],[])
(_,WeaponTargetingSF) -> (getAmmoLinks itm ++ [(AugmentedHUDSF,AugmentedHUDLink)],[]) (_,WeaponTargetingSF) -> (getAmmoLinks itm ++ [(AugmentedHUDSF,AugmentedHUDLink)],[])
-- TARGETING{} -> ([(AugmentedHUDSF,AugmentedHUDLink)],[])
_ -> ([],[]) _ -> ([],[])
where where
itm = ci ^. cItem itm = ci ^. cItem
@@ -99,12 +98,12 @@ laserLinkTest :: Item -> LinkTest
laserLinkTest itm = LTest (llleft itm) (llright itm) laserLinkTest itm = LTest (llleft itm) (llright itm)
llleft :: Item -> PartiallyComposedItem -> Maybe LinkUpdate 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 :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
llright itm pci = case pci ^. _1 . itType of llright itm pci = case pci ^. _1 . itType of
CRAFT TRANSFORMER -> Just (toLasgunUpdate itm) 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 :: Item -> LinkUpdate
toLasgunUpdate itm = LUpdate (ILink FunctionChangeLink orientAttachment) toLasgunUpdate itm = LUpdate (ILink FunctionChangeLink orientAttachment)