Fix attachment of augmented hud to laser
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
All good (597 modules, at 17:07:08)
|
||||
All good (597 modules, at 17:30:07)
|
||||
|
||||
@@ -282,6 +282,7 @@ testInventory =
|
||||
stackedInventory :: [Item]
|
||||
stackedInventory =
|
||||
[ torch
|
||||
, augmentedHUD
|
||||
, smallBattery
|
||||
, makeTypeCraft TRANSFORMER
|
||||
, remoteScreen
|
||||
|
||||
@@ -96,7 +96,7 @@ itemNumberDisplay :: Creature -> ComposedItem -> [String]
|
||||
itemNumberDisplay cr ci = case (ci ^. cItemFunction,iu) of
|
||||
-- UseTargeting {_tgPos = mp} -> [maybe "" shortShow mp]
|
||||
-- this could be cleaner here...
|
||||
(WeaponTargetingSF,_) -> [maybe "" shortShow (itm ^? itTargeting . itTgPos . _Just)]
|
||||
(WeaponTargetingSF,_) -> [maybe "" (const "!TARG!") (itm ^? itTargeting . itTgPos . _Just)]
|
||||
(_,UseHeld{}) -> []
|
||||
(_,UseHotkey{}) -> [showAutoRechargeProgress (_leftConsumption iu)]
|
||||
(_,UseEquip{}) -> showEquipmentNumber cr itm
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user