Make ammo magazines into own item type

This commit is contained in:
2024-06-22 12:03:32 +01:00
parent 35a56eef56
commit 8e127f0603
17 changed files with 258 additions and 255 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ updateBulVel bt = case _buTrajectory bt of
shootBullet :: Item -> Creature -> World -> World
shootBullet it cr w = fromMaybe (error "cannot find bullet ammo when expected to") $ do
invid <- it ^? itLocation . ipInvID
thebullet <- cr ^? crInv . ix (invid + 1) . itUse . attachParams . ammoParams . ampBullet
thebullet <- cr ^? crInv . ix (invid + 1) . itUse . amagParams . ampBullet
return $ w & cWorld . lWorld . instantBullets
.:~ ( thebullet
& buPos .~ _crPos cr