Move further towards removing _crInvEquipped

This commit is contained in:
2024-12-19 12:29:17 +00:00
parent 7e0184a54d
commit 80b03e6544
11 changed files with 82 additions and 97 deletions
+1 -3
View File
@@ -34,8 +34,6 @@ useE loc cr = case eo of
Just EMagShield -> useMagShield itm cr
Just EWristShield -> setWristShieldPos itm cr
Just EHeadLamp -> createHeadLamp itm cr
-- Just EBatterySource{} -> tryChargeBattery itm cr
-- Just EAmmoSource{} -> tryAttachBulletBelt itm cr
where
itm = loc ^. locLDT . ldtValue . _1
eo = itm ^? itUse . uequipEffect . eeUse
@@ -106,7 +104,7 @@ setWristShieldPos itm cr w = w & moveWallIDUnsafe i wlline
i = _eparamID $ _eeParams $ _uequipEffect $ _itUse itm
wlline = (f (V3 (-10) 7 0), f (V3 10 7 0))
invid = _ilInvID (_itLocation itm)
handtrans = case cr ^? crInvEquipped . ix invid of
handtrans = case cr ^? crInv . ix invid . itLocation . ilEquipPosition . _Just of
Just OnLeftWrist -> \cr' -> translatePointToLeftHand cr' . g
_ -> translatePointToRightHand
g