Move towards external targeting items

This commit is contained in:
2024-09-28 23:01:50 +01:00
parent d1690ed3ac
commit 241191ee1b
11 changed files with 38 additions and 27 deletions
+1
View File
@@ -138,6 +138,7 @@ loadMuzzle t@(LDT _ l _) mz = fromMaybe (t,Nothing) $ do
(i,(_,mag)) <- findWithIx (isAmmoIntLink as . fst) l
availableammo <- mag ^? ldtValue . itUse . amagLoadStatus . iaLoaded
let usedammo = min amamount availableammo
guard $ usedammo > 0
return (t & ldtLeft . ix i . _2 . ldtValue . itUse . amagLoadStatus . iaLoaded -~ usedammo
, Just (mz, usedammo, mag)
)