Correctly display held root item
This commit is contained in:
@@ -17,7 +17,7 @@ import ShapePicture
|
||||
itemEquipPict :: Creature -> LabelDoubleTree ItemLink ComposedItem -> SPic
|
||||
itemEquipPict cr itmtree = case itm ^. itUse of
|
||||
UseHeld{} | itm ^? itLocation . ilIsRoot == Just True
|
||||
&& itm ^? itLocation . ilIsSelected == Just True
|
||||
&& itm ^? itLocation . ilInvID == cr ^? crManipulation . manObject . imRootSelectedItem
|
||||
-> overPosSP (heldItemOffset itm cr) (itemTreeSPic itmtree)
|
||||
ituse -> fold $ do
|
||||
attachpos <- ituse ^? uequipEffect . eeAttachPos
|
||||
|
||||
@@ -168,6 +168,7 @@ joinItemsInList f xs = snd $ h (xs, [])
|
||||
Nothing -> h (ys, y : z : zs)
|
||||
Just w -> h (w : ys, zs)
|
||||
|
||||
-- this puts the first elements in the intmap at the end of the list
|
||||
invLDT :: IM.IntMap Item -> [LabelDoubleTree ItemLink PartiallyComposedItem]
|
||||
invLDT =
|
||||
joinItemsInList (leftRightCombine leftIsParentCombine rightIsParentCombine) . IM.elems
|
||||
|
||||
@@ -28,7 +28,7 @@ teslaGun =
|
||||
& itUse . heldDelay .~ NoDelay
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 4 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 10 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
||||
@@ -44,7 +44,7 @@ laser =
|
||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||
& itUse . heldDelay .~ NoDelay
|
||||
& itUse . heldTriggerType .~ AutoTrigger
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 4 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 6 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ LasGunFlare
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleLaser
|
||||
|
||||
Reference in New Issue
Block a user