Partially working change to selected items

This commit is contained in:
2023-02-07 12:07:13 +00:00
parent 5f7d662454
commit c354949ca9
27 changed files with 386 additions and 288 deletions
+3 -1
View File
@@ -37,5 +37,7 @@ crCurrentEquipment cr =
strFromHeldItem :: Creature -> Int
strFromHeldItem cr
| _posture (_crStance cr) == Aiming || crIsReloading cr =
negate $ fromMaybe 0 $ cr ^? crInv . ix (crSel cr) . itUse . heldAim . aimWeight
negate $ fromMaybe 0 $ cr ^? crInv . ix itRef . itUse . heldAim . aimWeight
| otherwise = 0
where
itRef = cr ^?! crInvSel . isel . ispItem -- unsafe!! TODO change